Invoke getter in the root object. #7484
Merged
Conversation
|
For example, ({
value: 1,
obj: {
value: 2,
["__proto__"]: {
value: 3,
__proto__: {
value: 4,
__proto__: {
value: 5,
get getter() { return this.value; },
},
},
},
},
})I should be able to expand But of course |
Good, I applied patch from #7489 on top of this patch and tested your test case: I think this is ready to be reviewed. I also added a mochitest in https://bugzilla.mozilla.org/show_bug.cgi?id=1513505 (TRY) |
To invoke getter, we were retrieving the parent node so we could access the getter. This works fine unless the getter is itself somewhere in the prototype chain and refers to a property set by an upper level. This patch changes how we retrieve the context to invoke the getter in to be the top-most, non-prototype grip, which should cover this case.
|
how does that look Jason? (last patch before refactor :) I want to uplift this to beta if possible) |
moz-v2v-gh
pushed a commit
to mozilla/gecko-dev
that referenced
this pull request
Dec 13, 2018
This lands the fix done in the debugger Reps for ObjectInspector (firefox-devtools/debugger#7484), and add a test to ensure we don't regress this. We take this as an opportunity to put some object inspector helpers in head.js so we don't repeat ourselves too much. Differential Revision: https://phabricator.services.mozilla.com/D14240 --HG-- extra : moz-landing-system : lando
mykmelez
pushed a commit
to mykmelez/gecko
that referenced
this pull request
Dec 14, 2018
This lands the fix done in the debugger Reps for ObjectInspector (firefox-devtools/debugger#7484), and add a test to ensure we don't regress this. We take this as an opportunity to put some object inspector helpers in head.js so we don't repeat ourselves too much. Differential Revision: https://phabricator.services.mozilla.com/D14240
jasonLaster
pushed a commit
that referenced
this pull request
Dec 14, 2018
* Invoke getter in the root object. To invoke getter, we were retrieving the parent node so we could access the getter. This works fine unless the getter is itself somewhere in the prototype chain and refers to a property set by an upper level. This patch changes how we retrieve the context to invoke the getter in to be the top-most, non-prototype grip, which should cover this case. * Remove unused getParentGripValue function
moz-v2v-gh
pushed a commit
to mozilla/gecko-dev
that referenced
this pull request
Dec 14, 2018
… a=RyanVM This lands the fix done in the debugger Reps for ObjectInspector (firefox-devtools/debugger#7484), and add a test to ensure we don't regress this. We take this as an opportunity to put some object inspector helpers in head.js so we don't repeat ourselves too much. Differential Revision: https://phabricator.services.mozilla.com/D14240 --HG-- extra : source : 7e17aa956dc60adac6ad4c9bfc5414ff0b59c848 extra : histedit_source : abab3c5ed73d4984ae6e69378e47e663c7c954f9
jasonLaster
pushed a commit
that referenced
this pull request
Dec 20, 2018
* Invoke getter in the root object. To invoke getter, we were retrieving the parent node so we could access the getter. This works fine unless the getter is itself somewhere in the prototype chain and refers to a property set by an upper level. This patch changes how we retrieve the context to invoke the getter in to be the top-most, non-prototype grip, which should cover this case. * Remove unused getParentGripValue function
xeonchen
pushed a commit
to xeonchen/gecko
that referenced
this pull request
Dec 21, 2018
… a=RyanVM This lands the fix done in the debugger Reps for ObjectInspector (firefox-devtools/debugger#7484), and add a test to ensure we don't regress this. We take this as an opportunity to put some object inspector helpers in head.js so we don't repeat ourselves too much. Differential Revision: https://phabricator.services.mozilla.com/D14240
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.

To invoke getter, we were retrieving the parent node
so we could access the getter. This works fine unless
the getter is itself somewhere in the prototype chain
and refers to a property set by an upper level.
This patch changes how we retrieve the context to
invoke the getter in to be the top-most, non-prototype
grip, which should cover this case.
Fixes #7397
Still WIP as I'm trying to find ways I could break it :)
@Loirooriol , would you have complex test cases I can test against to ensure this is a solid fix? :)