From 39a4566f201aaa04a13c8553b5be5ef7b1d342ee Mon Sep 17 00:00:00 2001 From: David Wendt Date: Wed, 8 Jul 2020 22:31:00 -0400 Subject: [PATCH] Instances should be listed as their prototypes (empty as they are) --- core/src/avm2/function.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/core/src/avm2/function.rs b/core/src/avm2/function.rs index 4365310c5..e81857db4 100644 --- a/core/src/avm2/function.rs +++ b/core/src/avm2/function.rs @@ -208,7 +208,17 @@ impl<'gc> FunctionObject<'gc> { return Err(format!("Could not resolve interface {:?}", interface_name).into()); } - interfaces.push(interface.unwrap().as_object()?); + let mut interface = interface.unwrap().as_object()?; + let iface_proto = interface + .get_property( + interface, + &QName::new(Namespace::public_namespace(), "prototype"), + activation, + context, + )? + .as_object()?; + + interfaces.push(iface_proto); } if !interfaces.is_empty() {