avm2: Children of the root inherit their parent's `loaderInfo`

This commit is contained in:
David Wendt 2022-01-15 19:00:09 -05:00 committed by Mike Welsh
parent f041cced72
commit df25d1ca8b
1 changed files with 4 additions and 6 deletions

View File

@ -565,7 +565,6 @@ pub fn loader_info<'gc>(
) -> Result<Value<'gc>, Error> {
if let Some(dobj) = this.and_then(|this| this.as_display_object()) {
if let Some(root) = dobj.avm2_root(&mut activation.context) {
if DisplayObject::ptr_eq(root, dobj) {
let movie = dobj.movie();
if let Some(movie) = movie {
@ -574,7 +573,6 @@ pub fn loader_info<'gc>(
return Ok(obj.into());
}
}
}
if DisplayObject::ptr_eq(dobj, activation.context.stage.into()) {
return Ok(LoaderInfoObject::from_stage(activation)?.into());