avm2: Remove `coerce_to_object` calls in `flash.display.DisplayObject`.
This commit is contained in:
parent
5f5f98ecdc
commit
7e7ee14d3b
|
@ -552,7 +552,7 @@ pub fn hit_test_point<'gc>(
|
||||||
|
|
||||||
/// Implements `hitTestObject`.
|
/// Implements `hitTestObject`.
|
||||||
pub fn hit_test_object<'gc>(
|
pub fn hit_test_object<'gc>(
|
||||||
activation: &mut Activation<'_, 'gc, '_>,
|
_activation: &mut Activation<'_, 'gc, '_>,
|
||||||
this: Option<Object<'gc>>,
|
this: Option<Object<'gc>>,
|
||||||
args: &[Value<'gc>],
|
args: &[Value<'gc>],
|
||||||
) -> Result<Value<'gc>, Error> {
|
) -> Result<Value<'gc>, Error> {
|
||||||
|
@ -561,8 +561,8 @@ pub fn hit_test_object<'gc>(
|
||||||
.get(0)
|
.get(0)
|
||||||
.cloned()
|
.cloned()
|
||||||
.unwrap_or(Value::Undefined)
|
.unwrap_or(Value::Undefined)
|
||||||
.coerce_to_object(activation)?
|
.as_object()
|
||||||
.as_display_object()
|
.and_then(|o| o.as_display_object())
|
||||||
{
|
{
|
||||||
return Ok(dobj.hit_test_object(rhs_dobj).into());
|
return Ok(dobj.hit_test_object(rhs_dobj).into());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue