From 49b893d933455e4ed47bcaedd18868293079cabb Mon Sep 17 00:00:00 2001 From: Ray Greenwell Date: Sat, 22 Mar 2008 01:41:15 +0000 Subject: [PATCH] Good news, it appears that flash blocks things in another security domain from screwing with our registered aliases. This might make points and rectangles work. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4978 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- src/as/com/threerings/util/ObjectMarshaller.as | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/as/com/threerings/util/ObjectMarshaller.as b/src/as/com/threerings/util/ObjectMarshaller.as index 86a663c0b..d64ee279f 100644 --- a/src/as/com/threerings/util/ObjectMarshaller.as +++ b/src/as/com/threerings/util/ObjectMarshaller.as @@ -21,6 +21,7 @@ package com.threerings.util { +import flash.net.registerClassAlias; // function import import flash.net.ObjectEncoding; import flash.geom.Point; @@ -32,7 +33,6 @@ import flash.utils.ByteArray; import flash.utils.Dictionary; import flash.utils.Endian; import flash.utils.IExternalizable; -import flash.utils.getQualifiedSuperclassName; // function import import com.threerings.io.TypedArray; @@ -186,6 +186,16 @@ public class ObjectMarshaller return null; // it all checks out! } + /** + * Our static initializer. + */ + private static function staticInit () :void + { + registerClassAlias("Point", Point); + registerClassAlias("Rectangle", Rectangle); + } + staticInit(); + /** Non-simple classes that we allow, as long as they are not subclassed. */ protected static const VALID_CLASSES :Array = [ ByteArray, Point, Rectangle ]; }