@@ -146,27 +146,19 @@ impl<'gc> Avm1<'gc> {
146146 return ;
147147 }
148148
149- // TODO(moulins): remove this activation, it's useless.
150- let parent_activation = Activation :: from_nothing (
151- context,
152- ActivationIdentifier :: root ( "[Actions Parent]" ) ,
153- active_clip,
154- ) ;
155-
156- let clip_obj = active_clip. object1_or_bare ( parent_activation. gc ( ) ) ;
149+ let clip_obj = active_clip. object1_or_bare ( context. gc ( ) ) ;
157150 let child_scope = Gc :: new (
158- parent_activation . gc ( ) ,
151+ context . gc ( ) ,
159152 Scope :: new (
160- parent_activation . scope ( ) ,
153+ context . avm1 . global_scope ( active_clip . swf_version ( ) ) ,
161154 scope:: ScopeClass :: Target ,
162155 clip_obj,
163156 ) ,
164157 ) ;
165- let constant_pool = parent_activation. context . avm1 . constant_pool ;
166- let child_name = parent_activation. id . child ( name) ;
158+ let constant_pool = context. avm1 . constant_pool ;
167159 let mut child_activation = Activation :: from_action (
168- parent_activation . context ,
169- child_name ,
160+ context,
161+ ActivationIdentifier :: root ( name ) ,
170162 active_clip. swf_version ( ) ,
171163 child_scope,
172164 constant_pool,
@@ -230,28 +222,20 @@ impl<'gc> Avm1<'gc> {
230222 return ;
231223 }
232224
233- // TODO(moulins): remove this activation, it's useless
234- let parent_activation = Activation :: from_nothing (
235- context,
236- ActivationIdentifier :: root ( "[Init Parent]" ) ,
237- active_clip,
238- ) ;
239-
240- let clip_obj = active_clip. object1_or_bare ( parent_activation. gc ( ) ) ;
225+ let clip_obj = active_clip. object1_or_bare ( context. gc ( ) ) ;
241226 let child_scope = Gc :: new (
242- parent_activation . gc ( ) ,
227+ context . gc ( ) ,
243228 Scope :: new (
244- parent_activation . scope ( ) ,
229+ context . avm1 . global_scope ( active_clip . swf_version ( ) ) ,
245230 scope:: ScopeClass :: Target ,
246231 clip_obj,
247232 ) ,
248233 ) ;
249- parent_activation. context . avm1 . push ( Value :: Undefined ) ;
250- let constant_pool = parent_activation. context . avm1 . constant_pool ;
251- let child_name = parent_activation. id . child ( "[Init]" ) ;
234+ context. avm1 . push ( Value :: Undefined ) ;
235+ let constant_pool = context. avm1 . constant_pool ;
252236 let mut child_activation = Activation :: from_action (
253- parent_activation . context ,
254- child_name ,
237+ context,
238+ ActivationIdentifier :: root ( "[Init]" ) ,
255239 active_clip. swf_version ( ) ,
256240 child_scope,
257241 constant_pool,
0 commit comments