From d366ceab0e79dc2310a8e366841c14d1510e02f2 Mon Sep 17 00:00:00 2001 From: David Wendt Date: Mon, 20 Jul 2020 19:11:08 -0400 Subject: [PATCH] Allow setting the protected namespace of a builtin class. --- core/src/avm2/class.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/src/avm2/class.rs b/core/src/avm2/class.rs index 9d136a869..dacffa6e5 100644 --- a/core/src/avm2/class.rs +++ b/core/src/avm2/class.rs @@ -148,6 +148,11 @@ impl<'gc> Class<'gc> { self.attributes = CollectWrapper(attributes); } + /// Add a protected namespace to this class. + pub fn set_protected_namespace(&mut self, ns: Namespace<'gc>) { + self.protected_namespace = Some(ns) + } + /// Construct a class from a `TranslationUnit` and it's class index. /// /// The returned class will be allocated, but no traits will be loaded. The