diff --git a/core/src/avm2/class.rs b/core/src/avm2/class.rs index ef6471b79..f27daf6c7 100644 --- a/core/src/avm2/class.rs +++ b/core/src/avm2/class.rs @@ -745,7 +745,7 @@ impl<'gc> Class<'gc> { &read.traits, None, read.super_class.map(|c| c.vtable()), - context, + context.gc_context, ); drop(read); diff --git a/core/src/avm2/object/class_object.rs b/core/src/avm2/object/class_object.rs index c1a7f1480..045cdfc9a 100644 --- a/core/src/avm2/object/class_object.rs +++ b/core/src/avm2/object/class_object.rs @@ -210,7 +210,7 @@ impl<'gc> ClassObject<'gc> { &class.traits(), Some(self.instance_scope()), self.superclass_object().map(|cls| cls.instance_vtable()), - &mut activation.context, + activation.context.gc_context, ); self.link_interfaces(activation)?; @@ -253,7 +253,7 @@ impl<'gc> ClassObject<'gc> { &c_class.traits(), Some(self.class_scope()), Some(activation.avm2().classes().class.instance_vtable()), - &mut activation.context, + activation.context.gc_context, ); self.set_vtable(activation.context.gc_context, class_vtable); diff --git a/core/src/avm2/script.rs b/core/src/avm2/script.rs index 8510ecd17..2e9afa36e 100644 --- a/core/src/avm2/script.rs +++ b/core/src/avm2/script.rs @@ -628,7 +628,6 @@ impl<'gc> Script<'gc> { write.initialized = true; let globals = write.globals; - let mut null_activation = Activation::from_nothing(context.reborrow()); let domain = write.domain; drop(write); @@ -641,7 +640,7 @@ impl<'gc> Script<'gc> { &self.traits()?, Some(scope), None, - &mut null_activation.context, + context.gc_context, ); globals.install_instance_slots(context.gc_context); diff --git a/core/src/avm2/vtable.rs b/core/src/avm2/vtable.rs index 3094597c9..1778721de 100644 --- a/core/src/avm2/vtable.rs +++ b/core/src/avm2/vtable.rs @@ -8,7 +8,6 @@ use crate::avm2::scope::ScopeChain; use crate::avm2::traits::{Trait, TraitKind}; use crate::avm2::value::Value; use crate::avm2::{Class, Error, Multiname, Namespace, QName}; -use crate::context::UpdateContext; use crate::string::AvmString; use gc_arena::{Collect, GcCell, Mutation}; use std::cell::Ref; @@ -216,7 +215,7 @@ impl<'gc> VTable<'gc> { traits: &[Trait<'gc>], scope: Option>, superclass_vtable: Option, - context: &mut UpdateContext<'_, 'gc>, + mc: &Mutation<'gc>, ) { // Let's talk about slot_ids and disp_ids. // Specification is one thing, but reality is another. @@ -269,7 +268,7 @@ impl<'gc> VTable<'gc> { // so long-term it's still something we should verify. // (and it's far from the only verification check we lack anyway) - let mut write = self.0.write(context.gc_context); + let mut write = self.0.write(mc); let write = write.deref_mut(); write.scope = scope; @@ -462,13 +461,13 @@ impl<'gc> VTable<'gc> { type_name, unit, .. } => ( Property::new_slot(new_slot_id), - PropertyClass::name(context.gc_context, type_name.clone(), *unit), + PropertyClass::name(mc, type_name.clone(), *unit), ), TraitKind::Const { type_name, unit, .. } => ( Property::new_const_slot(new_slot_id), - PropertyClass::name(context.gc_context, type_name.clone(), *unit), + PropertyClass::name(mc, type_name.clone(), *unit), ), TraitKind::Class { class, .. } => ( Property::new_const_slot(new_slot_id),