diff --git a/core/src/avm2/globals.rs b/core/src/avm2/globals.rs index e6ce2c6a0..57339fee9 100644 --- a/core/src/avm2/globals.rs +++ b/core/src/avm2/globals.rs @@ -16,8 +16,6 @@ use gc_arena::{Collect, GcCell, MutationContext}; use std::sync::Arc; use swf::TagCode; -use super::traits::Trait; - mod array; mod boolean; mod class; @@ -294,7 +292,6 @@ fn class<'gc>( ); domain.export_definition(class_name, script, activation.context.gc_context)?; domain.export_class(class_name, class_def, activation.context.gc_context)?; - script.install_trait_late(Trait::from_class(class_def), activation); Ok(class_object) } diff --git a/core/src/avm2/object/class_object.rs b/core/src/avm2/object/class_object.rs index e0781b355..afe9b1f37 100644 --- a/core/src/avm2/object/class_object.rs +++ b/core/src/avm2/object/class_object.rs @@ -11,10 +11,10 @@ use crate::avm2::property::Property; use crate::avm2::scope::{Scope, ScopeChain}; use crate::avm2::value::Value; use crate::avm2::vtable::{ClassBoundMethod, VTable}; -use crate::avm2::Error; use crate::avm2::Multiname; use crate::avm2::QName; use crate::avm2::TranslationUnit; +use crate::avm2::{Domain, Error}; use crate::string::AvmString; use fnv::FnvHashMap; use gc_arena::{Collect, GcCell, MutationContext}; diff --git a/core/src/avm2/script.rs b/core/src/avm2/script.rs index b9241cda4..18356ef27 100644 --- a/core/src/avm2/script.rs +++ b/core/src/avm2/script.rs @@ -481,17 +481,6 @@ impl<'gc> Script<'gc> { Ok(()) } - /// Install a trait on this `Script` object - /// This should only ever be called on the `global` script, during Rust-side initialization. - pub fn install_trait_late( - &self, - loaded_trait: Trait<'gc>, - activation: &mut Activation<'_, 'gc>, - ) { - let mut write = self.0.write(activation.context.gc_context); - write.traits.push(loaded_trait); - } - /// Return the entrypoint for the script and the scope it should run in. pub fn init(self) -> (Method<'gc>, Object<'gc>, Domain<'gc>) { let read = self.0.read();