deps: cherry-pick 0ba513f05 from V8 upstream#11712
Closed
fhinkel wants to merge 1 commit intonodejs:masterfrom
Closed
deps: cherry-pick 0ba513f05 from V8 upstream#11712fhinkel wants to merge 1 commit intonodejs:masterfrom
fhinkel wants to merge 1 commit intonodejs:masterfrom
Conversation
Original commit message: [api] Fix DescriptorInterceptor with access check. The DescriptorInterceptor should intercept all Object.getOwnPropertyDescriptor calls. This CL fixes the interceptor's behavior if the iterator state is ACCESS_CHECK. BUG= Review-Url: https://codereview.chromium.org/2707263002 Cr-Commit-Position: refs/heads/master@{nodejs#43417}
Member
Author
bnoordhuis
reviewed
Mar 6, 2017
| bool has_access = true; | ||
| if (it->state() == LookupIterator::ACCESS_CHECK) { | ||
| has_access = it->HasAccess() || JSObject::AllCanRead(it); | ||
| it->Next(); |
Member
There was a problem hiding this comment.
Is this sound? I see LookupIterator::Next() has a DCHECK_NE(JSPROXY, state_) but if I read JSObject::AllCanRead() right, it can stop at a JSPROXY instance. It seems like the logic should be:
if (has_access) it->Next();
Member
Author
There was a problem hiding this comment.
The access check is on the object_template, which is created by the embedder. We cannot configure templates as JSProxies. I'd say it's sound.
Member
Author
bnoordhuis
approved these changes
Mar 6, 2017
| bool has_access = true; | ||
| if (it->state() == LookupIterator::ACCESS_CHECK) { | ||
| has_access = it->HasAccess() || JSObject::AllCanRead(it); | ||
| it->Next(); |
ofrobots
approved these changes
Mar 8, 2017
jasnell
approved these changes
Mar 8, 2017
Member
Author
|
Landed in a44aff4. |
fhinkel
added a commit
that referenced
this pull request
Mar 9, 2017
Original commit message: [api] Fix DescriptorInterceptor with access check. The DescriptorInterceptor should intercept all Object.getOwnPropertyDescriptor calls. This CL fixes the interceptor's behavior if the iterator state is ACCESS_CHECK. BUG= Review-Url: https://codereview.chromium.org/2707263002 Cr-Commit-Position: refs/heads/master@{#43417} PR-URL: #11712 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Member
|
@fhinkel Is this already in 5.7? |
Member
Author
|
It's only in 5.8. Do you want to open the merge request or should I? |
Member
|
Feel free to do it. |
jungx098
pushed a commit
to jungx098/node
that referenced
this pull request
Mar 21, 2017
Original commit message: [api] Fix DescriptorInterceptor with access check. The DescriptorInterceptor should intercept all Object.getOwnPropertyDescriptor calls. This CL fixes the interceptor's behavior if the iterator state is ACCESS_CHECK. BUG= Review-Url: https://codereview.chromium.org/2707263002 Cr-Commit-Position: refs/heads/master@{nodejs#43417} PR-URL: nodejs#11712 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com> Reviewed-By: James M Snell <jasnell@gmail.com>
targos
pushed a commit
to targos/node
that referenced
this pull request
Mar 25, 2017
Original commit message: [api] Fix DescriptorInterceptor with access check. The DescriptorInterceptor should intercept all Object.getOwnPropertyDescriptor calls. This CL fixes the interceptor's behavior if the iterator state is ACCESS_CHECK. BUG= Review-Url: https://codereview.chromium.org/2707263002 Cr-Commit-Position: refs/heads/master@{nodejs#43417} PR-URL: nodejs#11712 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com> Reviewed-By: James M Snell <jasnell@gmail.com>
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.
Original commit message:
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
deps V8
This fix is needed to use the GenericNamedPropertyDescriptorCallback on the global object in node_contextify.cc.
5.6 is not maintained anymore, therefore not backmerged upstream.
cc/ @nodejs/v8