[haXe] Ugly serializer bug
Nicolas Cannasse
ncannasse at motion-twin.com
Tue Dec 4 12:28:30 CET 2007
Michael Pliskin a écrit :
> Hello all,
>
> I've met this ugly serializer problem again (with 'constructor'
> string serialized incorrectly) and I am now attaching a patch for
> it. I think the best is to patch the Hashtable, but I am not sure
> how to deal with iterator there - therefore, patching serializer
> only as a simple solution.
>
> It's really important for me to get this fixed - we've just met a
> really bad dataloss problem thanks to that..
I can understand that, but the problem is a bit more general that
haxe.Serializer itself. There is simply no way to build a proper
Hashtable in Flash, since "__proto__" is not a deletable property.
This actually affects the following keys :
- toLocalString
- isPropertyEnumerable
- isPrototypeOf
- hasOwnProperty
- toString
- valueOf
- addProperty
- unwatch
- watch
- constructor
- __proto__
- __constructor__
- prototype
Or in Flash9 :
- hasOwnProperty
- isPrototypeOf
- propertyIsEnumerable
- setPropertyIsEnumerable
- toString
- valueOf
- constructor
- prototype
So what would really be needed would be to modify Hash in order to
"securize" all keys in Flash. I'll put that on my TODO.
Best,
Nicolas
More information about the Haxe
mailing list