File tree Expand file tree Collapse file tree 1 file changed +17
-4
lines changed Expand file tree Collapse file tree 1 file changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -1346,12 +1346,13 @@ impl<'gc> Loader<'gc> {
13461346 }
13471347 }
13481348 player. lock ( ) . unwrap ( ) . update ( |uc| {
1349- let ( clip, event_handler) = match uc. load_manager . get_loader ( handle) {
1349+ let ( clip, event_handler, context ) = match uc. load_manager . get_loader ( handle) {
13501350 Some ( Loader :: Movie {
13511351 target_clip,
13521352 event_handler,
1353+ context,
13531354 ..
1354- } ) => ( * target_clip, * event_handler) ,
1355+ } ) => ( * target_clip, * event_handler, * context ) ,
13551356 None => return Err ( Error :: Cancelled ) ,
13561357 _ => unreachable ! ( ) ,
13571358 } ;
@@ -1396,8 +1397,20 @@ impl<'gc> Loader<'gc> {
13961397 }
13971398
13981399 let mut activation = Avm2Activation :: from_nothing ( uc. reborrow ( ) ) ;
1399- let parent_domain = activation. avm2 ( ) . global_domain ( ) ;
1400- let domain = Avm2Domain :: movie_domain ( & mut activation, parent_domain) ;
1400+ let domain = context
1401+ . and_then ( |o| {
1402+ o. get_property (
1403+ & Avm2Multiname :: public ( "applicationDomain" ) ,
1404+ & mut activation,
1405+ )
1406+ . ok ( )
1407+ } )
1408+ . and_then ( |v| v. coerce_to_object ( & mut activation) . ok ( ) )
1409+ . and_then ( |o| o. as_application_domain ( ) )
1410+ . unwrap_or_else ( || {
1411+ let parent_domain = activation. avm2 ( ) . global_domain ( ) ;
1412+ Avm2Domain :: movie_domain ( & mut activation, parent_domain)
1413+ } ) ;
14011414 activation
14021415 . context
14031416 . library
You can’t perform that action at this time.
0 commit comments