Fix different priority of getter if by name or property on different namespaces#23253
Open
wsxarcher wants to merge 6 commits intoruffle-rs:masterfrom
Open
Fix different priority of getter if by name or property on different namespaces#23253wsxarcher wants to merge 6 commits intoruffle-rs:masterfrom
wsxarcher wants to merge 6 commits intoruffle-rs:masterfrom
Conversation
Collaborator
|
Unfortunately I think the proper solution to this is a little more complicated. We need to change our vtable implementation so that each vtable first attempts to lookup a property on only its own map, then falls back to its parent vtable. See this SWF: chainedvt.swf.zip It outputs with this PR, but with FP. Since |
Contributor
Author
|
Fixing the insertion order rather than the lookup seems to fix also your case without touching the vtable, I added your test. |
010c017 to
3f8de16
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a subclass declares a field with the same local name as a private (or internal) field in a superclass, AVM2 property lookups via bracket access (this["field"]) were resolving to the wrong slot.
The priority is reversed from where they are present in the set with priority to publics.
Traced with Flashplayer 32