avm2: Skip attempting to serialize methods
This commit is contained in:
parent
43f5aaaab9
commit
7d07eb2b52
|
@ -202,11 +202,15 @@ pub fn recursive_serialize<'gc>(
|
|||
) -> Result<(), Error<'gc>> {
|
||||
if let Some(static_properties) = static_properties {
|
||||
let vtable = obj.vtable();
|
||||
// TODO: respect versioning
|
||||
let mut props = vtable.public_properties();
|
||||
// Flash appears to use vtable iteration order, but we sort ours
|
||||
// to make our test output consistent.
|
||||
props.sort_by_key(|(name, _)| name.to_utf8_lossy().to_string());
|
||||
for (name, prop) in props {
|
||||
if let Property::Method { .. } = prop {
|
||||
continue;
|
||||
}
|
||||
if let Property::Virtual { get, set } = prop {
|
||||
if !(get.is_some() && set.is_some()) {
|
||||
continue;
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
// compiled with mxmlc (and modified to SWF v9)
|
||||
|
||||
import flash.utils.ByteArray;
|
||||
import flash.geom.Point;
|
||||
|
||||
var p = new Point(4.5, 5.5);
|
||||
var b = new ByteArray();
|
||||
b.writeObject(p);
|
||||
trace(b.length);
|
||||
|
||||
package {
|
||||
import flash.display.MovieClip;
|
||||
|
||||
public class Test extends MovieClip {
|
||||
public function Test() {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
25
|
Binary file not shown.
|
@ -0,0 +1 @@
|
|||
num_frames = 1
|
Loading…
Reference in New Issue