Swap out `has_property`'s stub impl.
This commit is contained in:
parent
e5142e85e9
commit
984e701142
|
@ -114,6 +114,10 @@ impl<'gc> TObject<'gc> for FunctionObject<'gc> {
|
||||||
.set_property(name, value, avm, context)
|
.set_property(name, value, avm, context)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn has_property(self, name: &QName) -> bool {
|
||||||
|
self.0.read().base.has_property(name)
|
||||||
|
}
|
||||||
|
|
||||||
fn as_ptr(&self) -> *const ObjectPtr {
|
fn as_ptr(&self) -> *const ObjectPtr {
|
||||||
self.0.as_ptr() as *const ObjectPtr
|
self.0.as_ptr() as *const ObjectPtr
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,9 +65,7 @@ pub trait TObject<'gc>: 'gc + Collect + Debug + Into<Object<'gc>> + Clone + Copy
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Indicates whether or not a property exists on an object.
|
/// Indicates whether or not a property exists on an object.
|
||||||
fn has_property(self, _name: &QName) -> bool {
|
fn has_property(self, _name: &QName) -> bool;
|
||||||
false
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Indicates whether or not a property exists on an object and is not part
|
/// Indicates whether or not a property exists on an object and is not part
|
||||||
/// of the prototype chain.
|
/// of the prototype chain.
|
||||||
|
|
|
@ -44,6 +44,10 @@ impl<'gc> TObject<'gc> for ScriptObject<'gc> {
|
||||||
.set_property(name, value, avm, context)
|
.set_property(name, value, avm, context)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn has_property(self, name: &QName) -> bool {
|
||||||
|
self.0.read().has_property(name)
|
||||||
|
}
|
||||||
|
|
||||||
fn as_ptr(&self) -> *const ObjectPtr {
|
fn as_ptr(&self) -> *const ObjectPtr {
|
||||||
self.0.as_ptr() as *const ObjectPtr
|
self.0.as_ptr() as *const ObjectPtr
|
||||||
}
|
}
|
||||||
|
@ -91,4 +95,8 @@ impl<'gc> ScriptObjectData<'gc> {
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn has_property(&self, name: &QName) -> bool {
|
||||||
|
self.values.get(name).is_some()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue