|
|
Created:
5 years, 6 months ago by arv (Not doing code reviews) Modified:
5 years, 6 months ago CC:
v8-dev Base URL:
https://chromium.googlesource.com/v8/v8.git@master Target Ref:
refs/pending/heads/master Project:
v8 Visibility:
Public. |
Description[es6] Make sure we call add property when adding a new property
When setting a property using `super.prop = val` we need to use
add property if we are adding a new property and not set property.
BUG=493566
LOG=N
R=verwaest@chromium.org, dslomov@chromium.org
Committed: https://crrev.com/5f72593d166e1d604d6061573bd220da5ce64db4
Cr-Commit-Position: refs/heads/master@{#28971}
Patch Set 1 #
Total comments: 4
Patch Set 2 : Use a loop and add proxy tests #Patch Set 3 : Only test left #Messages
Total messages: 27 (5 generated)
arv@chromium.org changed reviewers: + verwaest@chromium.org
PTAL
Ping
https://codereview.chromium.org/1161073002/diff/1/src/objects.cc File src/objects.cc (right): https://codereview.chromium.org/1161073002/diff/1/src/objects.cc#newcode3336 src/objects.cc:3336: return AddDataProperty(&own_lookup, value, NONE, language_mode, AddDataProperty has a DCHECK that the receiver is not a proxy. Can found be false afte a proxy trap is invoked?
caitpotter88@gmail.com changed reviewers: + caitpotter88@gmail.com
https://codereview.chromium.org/1161073002/diff/1/src/objects.cc File src/objects.cc (right): https://codereview.chromium.org/1161073002/diff/1/src/objects.cc#newcode3336 src/objects.cc:3336: return AddDataProperty(&own_lookup, value, NONE, language_mode, On 2015/06/01 14:17:58, arv wrote: > AddDataProperty has a DCHECK that the receiver is not a proxy. > > Can found be false afte a proxy trap is invoked? In the current implementation, found can be false if the property key is a Symbol (the proxy trap is never invoked in this case).
lgtm https://codereview.chromium.org/1161073002/diff/1/src/objects.cc File src/objects.cc (right): https://codereview.chromium.org/1161073002/diff/1/src/objects.cc#newcode3336 src/objects.cc:3336: return AddDataProperty(&own_lookup, value, NONE, language_mode, On 2015/06/01 14:17:58, arv wrote: > AddDataProperty has a DCHECK that the receiver is not a proxy. > > Can found be false afte a proxy trap is invoked? Not if the receiver is the proxy, as is the case here.
Actually, I think this is not right. You have to do the DATA thing after ruling out the interceptor / access check case.
https://codereview.chromium.org/1161073002/diff/1/src/objects.cc File src/objects.cc (right): https://codereview.chromium.org/1161073002/diff/1/src/objects.cc#newcode3336 src/objects.cc:3336: return AddDataProperty(&own_lookup, value, NONE, language_mode, On 2015/06/01 14:37:03, Toon Verwaest wrote: > On 2015/06/01 14:17:58, arv wrote: > > AddDataProperty has a DCHECK that the receiver is not a proxy. > > > > Can found be false afte a proxy trap is invoked? > > Not if the receiver is the proxy, as is the case here. I think you'd want to make this switch nested in a for-loop like is the case for other Set with iterator. After ruling out the interceptor / access check, you just continue with whatever is behind the interceptor / access check. Behind the access check could be an interceptor. Behind the interceptor could be data, or not-found.
not lgtm then
On 2015/06/01 14:42:13, arv wrote: > not lgtm then That didn't work ;-)
right. not lgtm
Use a loop and add proxy tests
PTAL I added a loop so that it keeps going until NOT_FOUND. I also added some tests for the JSProxy path.
arv@chromium.org changed reviewers: + dslomov@chromium.org
Dmitry, welcome back. Can you take a look?
Dmitry, welcome back. Can you take a look?
On 2015/06/08 18:29:43, arv wrote: > Dmitry, welcome back. Can you take a look? lgtm but Toon is back too, would be nice if he can have a look as well
Ping. Toon, can you take a look?
lgtm... but I actually already fixed it and landed it as part of another CL, since I was cleaning up all SetProperty related code.
(not the test though)
On 2015/06/11 20:07:34, Toon Verwaest wrote: > (not the test though) I'll commit the test then. Thanks
The CQ bit was checked by arv@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from dslomov@chromium.org, verwaest@chromium.org Link to the patchset: https://codereview.chromium.org/1161073002/#ps40001 (title: "Only test left")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1161073002/40001
Message was sent while issue was closed.
Committed patchset #3 (id:40001)
Message was sent while issue was closed.
Patchset 3 (id:??) landed as https://crrev.com/5f72593d166e1d604d6061573bd220da5ce64db4 Cr-Commit-Position: refs/heads/master@{#28971} |