avm2: Remove the prototype setter exception as prototypes no longer provide setters to instances.

This commit is contained in:
David Wendt 2021-05-27 00:24:35 -04:00
parent a8fd0622b2
commit 6deaa6f441
1 changed files with 1 additions and 17 deletions

View File

@ -160,23 +160,7 @@ pub trait TObject<'gc>: 'gc + Collect + Debug + Into<Object<'gc>> + Clone + Copy
}
}
if self.has_own_virtual_setter(name) {
return self.set_property_local(receiver, name, value, activation);
}
let mut proto = self.proto();
while let Some(mut my_proto) = proto {
//NOTE: This only works because we validate ahead-of-time that
//we're calling a virtual setter. If you call `set_property` on
//a non-virtual you will actually alter the prototype.
if my_proto.has_own_virtual_setter(name) {
return my_proto.set_property(receiver, name, value, activation);
}
proto = my_proto.proto();
}
receiver.set_property_local(receiver, name, value, activation)
self.set_property_local(receiver, name, value, activation)
}
/// Init a property on this specific object.