From af8ee6225eb786e18141e14af863e151fdf26b93 Mon Sep 17 00:00:00 2001 From: Lord-McSweeney Date: Sun, 24 Nov 2024 11:46:43 -0800 Subject: [PATCH] avm2: Don't activate fast-path for get/setproperty when Multiname doesn't contain public namespace --- core/src/avm2/activation.rs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/core/src/avm2/activation.rs b/core/src/avm2/activation.rs index 7bddf88bed3d..e695382240f5 100644 --- a/core/src/avm2/activation.rs +++ b/core/src/avm2/activation.rs @@ -1309,9 +1309,12 @@ impl<'a, 'gc> Activation<'a, 'gc> { } // (fast) side path for dictionary/array-likes - // NOTE: FP behaves differently here when the public namespace isn't + // Note that this path doesn't activate when the public namespace isn't // included in the multiname's namespace set - if multiname.has_lazy_name() && !multiname.has_lazy_ns() { + if multiname.has_lazy_name() + && !multiname.has_lazy_ns() + && multiname.contains_public_namespace() + { // `MultinameL` is the only form of multiname that allows fast-path // or alternate-path lookups based on the local name *value*, // rather than it's string representation. @@ -1370,9 +1373,12 @@ impl<'a, 'gc> Activation<'a, 'gc> { } // side path for dictionary/arrays (TODO) - // NOTE: FP behaves differently here when the public namespace isn't + // Note that this path doesn't activate when the public namespace isn't // included in the multiname's namespace set - if multiname.has_lazy_name() && !multiname.has_lazy_ns() { + if multiname.has_lazy_name() + && !multiname.has_lazy_ns() + && multiname.contains_public_namespace() + { // `MultinameL` is the only form of multiname that allows fast-path // or alternate-path lookups based on the local name *value*, // rather than it's string representation.