Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(211)

Issue 1230793002: [es6] silence access-check failure for well-known symbol properties (Closed)

Created:
5 years, 5 months ago by caitp (gmail)
Modified:
5 years, 2 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] silence access-check failure for well-known symbol properties Symbols marked as "well-known" now return an undefined value when loaded with a failed access check, instead of throwing. Currently, only @@isConcatSpreadable is marked as well-known, until the correct behaviour is properly specified. BUG=v8:4289, 507553 LOG=N R=adamk@chromium.org, jochen@chromium.org, verwaest@chromium.org Committed: https://crrev.com/8561dbd655769cb63fc797e7ebd3923bee943212 Cr-Commit-Position: refs/heads/master@{#31131}

Patch Set 1 #

Patch Set 2 : Expose @@isConcatSpreadable to API + simple test #

Total comments: 1

Patch Set 3 : change test slightly #

Total comments: 6

Patch Set 4 : Remove pointless test part #

Total comments: 2

Patch Set 5 : remove test copy-pasta #

Total comments: 1

Patch Set 6 : Rebase #

Patch Set 7 : Refactor (Alternative Impl.) #

Total comments: 1

Patch Set 8 : Make well-known symbols behave magically #

Total comments: 10

Patch Set 9 : Declaration removed, well-known symbol check simplified, comment added #

Patch Set 10 : Only special-case @@isConcatSpreadable #

Patch Set 11 : Rebase #

Patch Set 12 : Ensure @@isConcatSpreadable is actually installed now that its in a separate list #

Unified diffs Side-by-side diffs Delta from patch set Stats (+77 lines, -28 lines) Patch
M include/v8.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M src/api.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +6 lines, -0 lines 0 comments Download
M src/bootstrapper.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
M src/factory.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M src/heap/heap.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +11 lines, -3 lines 0 comments Download
M src/heap/heap.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +9 lines, -0 lines 0 comments Download
M src/heap/heap-inl.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
M src/objects.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +6 lines, -0 lines 0 comments Download
M src/objects.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +8 lines, -0 lines 0 comments Download
M src/objects-inl.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M src/profiler/heap-snapshot-generator.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
M test/cctest/test-api.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +31 lines, -25 lines 0 comments Download

Messages

Total messages: 67 (13 generated)
caitp (gmail)
Hi, this is one approach which should maintain legacy behaviour when dealing with objects from ...
5 years, 5 months ago (2015-07-09 13:55:00 UTC) #2
caitp (gmail)
On 2015/07/09 13:55:00, caitp wrote: > Hi, > > this is one approach which should ...
5 years, 5 months ago (2015-07-09 13:56:03 UTC) #3
caitp (gmail)
https://codereview.chromium.org/1230793002/diff/40001/test/cctest/test-api.cc File test/cctest/test-api.cc (right): https://codereview.chromium.org/1230793002/diff/40001/test/cctest/test-api.cc#newcode21910 test/cctest/test-api.cc:21910: Local<Value> result2 = CompileRun("[].concat([global, global], protected)"); This is probably ...
5 years, 5 months ago (2015-07-09 14:49:42 UTC) #5
adamk
A few comments, but as I say below, I think verwaest@ is the right reviewer ...
5 years, 5 months ago (2015-07-09 15:56:04 UTC) #6
caitp (gmail)
https://codereview.chromium.org/1230793002/diff/40001/test/cctest/test-api.cc File test/cctest/test-api.cc (right): https://codereview.chromium.org/1230793002/diff/40001/test/cctest/test-api.cc#newcode21910 test/cctest/test-api.cc:21910: Local<Value> result2 = CompileRun("[].concat([global, global], protected)"); On 2015/07/09 15:56:04, ...
5 years, 5 months ago (2015-07-09 16:02:09 UTC) #7
adamk
I think I'm liking my "minimal" suggestion less now, since it could cause us to ...
5 years, 5 months ago (2015-07-09 17:17:25 UTC) #8
caitp (gmail)
On 2015/07/09 17:17:25, adamk wrote: > I think I'm liking my "minimal" suggestion less now, ...
5 years, 5 months ago (2015-07-09 18:40:46 UTC) #9
caitp (gmail)
https://codereview.chromium.org/1230793002/diff/40001/test/cctest/test-api.cc File test/cctest/test-api.cc (right): https://codereview.chromium.org/1230793002/diff/40001/test/cctest/test-api.cc#newcode21910 test/cctest/test-api.cc:21910: Local<Value> result2 = CompileRun("[].concat([global, global], protected)"); On 2015/07/09 17:17:25, ...
5 years, 5 months ago (2015-07-09 18:43:15 UTC) #10
adamk
https://codereview.chromium.org/1230793002/diff/60001/test/cctest/test-api.cc File test/cctest/test-api.cc (right): https://codereview.chromium.org/1230793002/diff/60001/test/cctest/test-api.cc#newcode21889 test/cctest/test-api.cc:21889: Local<Object> global_object = proxy_object->GetPrototype()->ToObject(isolate); I don't think you need ...
5 years, 5 months ago (2015-07-09 18:59:13 UTC) #11
caitp (gmail)
https://codereview.chromium.org/1230793002/diff/20001/src/objects.h File src/objects.h (right): https://codereview.chromium.org/1230793002/diff/20001/src/objects.h#newcode1219 src/objects.h:1219: MUST_USE_RESULT static inline MaybeHandle<Object> GetPropertyOrFallbackValue( How about something like ...
5 years, 5 months ago (2015-07-09 19:14:00 UTC) #12
adamk
I'd like to wait for a bit more time on the public-script-coord thread, though I ...
5 years, 5 months ago (2015-07-09 23:07:15 UTC) #13
Toon Verwaest
wow ... do we really need this? I'm really really not in favor of any ...
5 years, 5 months ago (2015-07-10 13:22:16 UTC) #14
caitp (gmail)
On 2015/07/10 13:22:16, Toon Verwaest wrote: > wow ... > > do we really need ...
5 years, 5 months ago (2015-07-10 13:54:01 UTC) #15
Toon Verwaest
I think this needs to be thought trough by people writing the spec. This is ...
5 years, 5 months ago (2015-07-10 15:21:12 UTC) #16
Toon Verwaest
+andreas
5 years, 5 months ago (2015-07-10 15:21:35 UTC) #18
Toon Verwaest
(that should have been obj->IsAccessCheckNeeded() && !isolate->MayAccess(Handle<JSObject>::cast(obj)) I guess)
5 years, 5 months ago (2015-07-10 15:30:37 UTC) #19
adamk
Just to link discussions together further, the spec-world discussion about this is taking place at: ...
5 years, 5 months ago (2015-07-10 17:24:39 UTC) #20
caitp (gmail)
On 2015/07/10 17:24:39, adamk wrote: > Just to link discussions together further, the spec-world discussion ...
5 years, 5 months ago (2015-07-11 17:09:02 UTC) #21
caitp (gmail)
On 2015/07/11 17:09:02, caitp wrote: > On 2015/07/10 17:24:39, adamk wrote: > > Just to ...
5 years, 5 months ago (2015-07-11 17:21:23 UTC) #22
Toon Verwaest
Yes. That what I meant with my all-can-read suggestion; that's the same thing. If that's ...
5 years, 5 months ago (2015-07-13 13:12:19 UTC) #23
adamk
On 2015/07/11 at 17:09:02, caitpotter88 wrote: > On 2015/07/10 17:24:39, adamk wrote: > > Just ...
5 years, 5 months ago (2015-07-13 18:12:49 UTC) #24
caitp (gmail)
On 2015/07/13 18:12:49, adamk wrote: > On 2015/07/11 at 17:09:02, caitpotter88 wrote: > > On ...
5 years, 5 months ago (2015-07-13 18:20:59 UTC) #25
adamk
On 2015/07/13 at 18:20:59, caitpotter88 wrote: > On 2015/07/13 18:12:49, adamk wrote: > > On ...
5 years, 5 months ago (2015-07-13 18:25:07 UTC) #26
Toon Verwaest
With an all-can-read property you can still return whatever you want for iframes that don't ...
5 years, 5 months ago (2015-07-14 07:22:50 UTC) #27
Toon Verwaest
But obviously it's still visibly different from what Boris suggests, given that the property is ...
5 years, 5 months ago (2015-07-14 07:27:19 UTC) #28
Toon Verwaest
What about setting a bit on symbols whether they are "absent on access check failure", ...
5 years, 5 months ago (2015-07-18 07:59:19 UTC) #29
adamk
On 2015/07/18 07:59:19, Toon Verwaest wrote: > What about setting a bit on symbols whether ...
5 years, 2 months ago (2015-09-29 21:48:28 UTC) #30
adamk
On 2015/09/29 21:48:28, adamk wrote: > On 2015/07/18 07:59:19, Toon Verwaest wrote: > > What ...
5 years, 2 months ago (2015-09-29 21:49:18 UTC) #31
caitp (gmail)
On 2015/09/29 21:49:18, adamk wrote: > On 2015/09/29 21:48:28, adamk wrote: > > On 2015/07/18 ...
5 years, 2 months ago (2015-09-30 04:26:02 UTC) #32
jochen (gone - plz use gerrit)
include/ lgtm
5 years, 2 months ago (2015-09-30 09:24:01 UTC) #33
caitp (gmail)
https://codereview.chromium.org/1230793002/diff/140001/src/objects.cc File src/objects.cc (right): https://codereview.chromium.org/1230793002/diff/140001/src/objects.cc#newcode662 src/objects.cc:662: access_check_failed = false; This alternative implementation doesn't change the ...
5 years, 2 months ago (2015-10-01 15:16:47 UTC) #35
Toon Verwaest
I still stand by my previous comments. I don't want access checks to be exposed ...
5 years, 2 months ago (2015-10-01 15:30:13 UTC) #36
caitp (gmail)
On 2015/10/01 15:30:13, Toon Verwaest wrote: > I still stand by my previous comments. I ...
5 years, 2 months ago (2015-10-01 16:03:48 UTC) #37
caitp (gmail)
New patch set does not throw for loads of spec'd symbol hooks ever, so but ...
5 years, 2 months ago (2015-10-01 16:23:55 UTC) #38
Toon Verwaest
Last patch looks good from my side. Some additional comments. https://codereview.chromium.org/1230793002/diff/160001/src/objects.cc File src/objects.cc (right): https://codereview.chromium.org/1230793002/diff/160001/src/objects.cc#newcode997 ...
5 years, 2 months ago (2015-10-02 08:05:27 UTC) #39
Toon Verwaest
@adamk: if we later need other behavior for other symbols, we could switch in ...WithFailedAccessCheck ...
5 years, 2 months ago (2015-10-02 08:09:42 UTC) #40
caitp (gmail)
https://codereview.chromium.org/1230793002/diff/160001/src/objects.cc File src/objects.cc (right): https://codereview.chromium.org/1230793002/diff/160001/src/objects.cc#newcode997 src/objects.cc:997: if (!it->IsElement()) { On 2015/10/02 08:05:27, Toon Verwaest wrote: ...
5 years, 2 months ago (2015-10-02 10:01:15 UTC) #41
Toon Verwaest
https://codereview.chromium.org/1230793002/diff/160001/src/objects.cc File src/objects.cc (right): https://codereview.chromium.org/1230793002/diff/160001/src/objects.cc#newcode997 src/objects.cc:997: if (!it->IsElement()) { On 2015/10/02 10:01:15, caitp wrote: > ...
5 years, 2 months ago (2015-10-02 10:07:02 UTC) #42
caitp (gmail)
https://codereview.chromium.org/1230793002/diff/160001/src/objects.cc File src/objects.cc (right): https://codereview.chromium.org/1230793002/diff/160001/src/objects.cc#newcode997 src/objects.cc:997: if (!it->IsElement()) { On 2015/10/02 10:07:01, Toon Verwaest wrote: ...
5 years, 2 months ago (2015-10-02 10:41:56 UTC) #43
Toon Verwaest
lgtm, thanks
5 years, 2 months ago (2015-10-02 10:54:01 UTC) #44
caitp (gmail)
I've written http://caitp.github.io/spidermonkey-wks-security/ to help track all of the behaviours of cross-origin access to symbol ...
5 years, 2 months ago (2015-10-02 13:10:53 UTC) #46
adamk
I'm happy that Toon is happy with this approach. I'm still a bit worried about ...
5 years, 2 months ago (2015-10-05 16:41:14 UTC) #47
caitp (gmail)
On 2015/10/05 16:41:14, adamk wrote: > I'm happy that Toon is happy with this approach. ...
5 years, 2 months ago (2015-10-05 16:44:56 UTC) #48
caitp (gmail)
On 2015/10/05 16:44:56, caitp wrote: > On 2015/10/05 16:41:14, adamk wrote: > > I'm happy ...
5 years, 2 months ago (2015-10-05 20:18:13 UTC) #49
adamk
lgtm with an updated CL description noting that this only changes behavior for @@isConcatSpreadable for ...
5 years, 2 months ago (2015-10-05 20:21:59 UTC) #50
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1230793002/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1230793002/200001
5 years, 2 months ago (2015-10-06 16:55:02 UTC) #53
commit-bot: I haz the power
Try jobs failed on following builders: v8_linux64_asan_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux64_asan_rel/builds/8652) v8_linux64_avx2_rel on tryserver.v8 (JOB_FAILED, ...
5 years, 2 months ago (2015-10-06 16:56:25 UTC) #55
caitp (gmail)
On 2015/10/06 16:56:25, commit-bot: I haz the power wrote: > Try jobs failed on following ...
5 years, 2 months ago (2015-10-06 16:58:27 UTC) #56
caitp (gmail)
On 2015/10/06 16:58:27, caitp wrote: > On 2015/10/06 16:56:25, commit-bot: I haz the power wrote: ...
5 years, 2 months ago (2015-10-06 16:59:14 UTC) #57
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1230793002/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1230793002/220001
5 years, 2 months ago (2015-10-06 17:05:43 UTC) #60
commit-bot: I haz the power
Try jobs failed on following builders: v8_linux64_avx2_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux64_avx2_rel/builds/5021) v8_mac_rel on tryserver.v8 (JOB_FAILED, ...
5 years, 2 months ago (2015-10-06 17:16:55 UTC) #62
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1230793002/230001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1230793002/230001
5 years, 2 months ago (2015-10-06 17:45:48 UTC) #65
commit-bot: I haz the power
Committed patchset #12 (id:230001)
5 years, 2 months ago (2015-10-06 18:10:29 UTC) #66
commit-bot: I haz the power
5 years, 2 months ago (2015-10-06 18:10:57 UTC) #67
Message was sent while issue was closed.
Patchset 12 (id:??) landed as
https://crrev.com/8561dbd655769cb63fc797e7ebd3923bee943212
Cr-Commit-Position: refs/heads/master@{#31131}

Powered by Google App Engine
This is Rietveld 408576698