Skip to content

Commit

Permalink
avm2: Don't activate fast-path for get/setproperty when Multiname doe…
Browse files Browse the repository at this point in the history
…sn't contain public namespace
  • Loading branch information
Lord-McSweeney authored and Lord-McSweeney committed Nov 24, 2024
1 parent 4bc4cc7 commit af8ee62
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions core/src/avm2/activation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit af8ee62

Please sign in to comment.