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

Issue 2550423002: Propagate exceptions thrown by access check interceptors. (Closed)

Created:
4 years ago by dcheng
Modified:
4 years ago
CC:
site-isolation-reviews_chromium.org, v8-reviews_googlegroups.com
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Propagate exceptions thrown by access check interceptors. When v8 fails an access check, it invokes a helper to try to see if it can service the request via an access check interceptor. Invoking the access check interceptor can throw an exception (e.g. a SecurityError). Unfortunately, the failed access check property helpers and the interceptor helpers don't agree on how to propagate the exception: if the interceptor helper detects a scheduled exception, it promotes the exception to a pending exception and returns to the failed access check property helper. The failed access check property helper also has an early return in case of a scheduled exception. However, this doesn't work, as the previously thrown exception is no longer scheduled, as it's been promoted to a pending exception. Thus, the failed access check property helper always end up calling the failed access check callback as well. Since Blink's implementation of the failed access check callback also throws an exception, this conflicts with the previously-thrown, already-pending exception. With this patch, the failed access check property helpers check for a pending exception rather than a scheduled exception after invoking the interceptor, so the exception can be propagated correctly. BUG=v8:5715 R=yangguo@chromium.org,jochen@chromium.org Committed: https://crrev.com/ebe94192284e5f4437929a3256749fef7cb53329 Cr-Commit-Position: refs/heads/master@{#41556}

Patch Set 1 #

Total comments: 1

Patch Set 2 : propagate #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+106 lines, -6 lines) Patch
M src/objects.cc View 1 3 chunks +7 lines, -6 lines 1 comment Download
M test/cctest/test-access-checks.cc View 1 3 chunks +99 lines, -0 lines 0 comments Download

Messages

Total messages: 27 (15 generated)
dcheng
Does this make sense?
4 years ago (2016-12-06 09:56:37 UTC) #3
jochen (gone - plz use gerrit)
do we need a similar change for the getter case? https://codereview.chromium.org/2550423002/diff/1/src/objects.cc File src/objects.cc (right): https://codereview.chromium.org/2550423002/diff/1/src/objects.cc#newcode1892 ...
4 years ago (2016-12-06 10:05:22 UTC) #6
dcheng
On 2016/12/06 10:05:22, jochen wrote: > do we need a similar change for the getter ...
4 years ago (2016-12-06 10:29:33 UTC) #9
jochen (gone - plz use gerrit)
ok, lgtm if you address my comment. Fixing the getter separately is fine
4 years ago (2016-12-06 10:31:54 UTC) #10
dcheng
On 2016/12/06 10:29:33, dcheng wrote: > On 2016/12/06 10:05:22, jochen wrote: > > do we ...
4 years ago (2016-12-06 10:44:13 UTC) #11
dcheng
On 2016/12/06 10:44:13, dcheng wrote: > On 2016/12/06 10:29:33, dcheng wrote: > > On 2016/12/06 ...
4 years ago (2016-12-06 10:46:16 UTC) #12
dcheng
On 2016/12/06 10:46:16, dcheng wrote: > On 2016/12/06 10:44:13, dcheng wrote: > > On 2016/12/06 ...
4 years ago (2016-12-06 10:59:23 UTC) #13
dcheng
I did a bit more reading, and I think this is a more correct fix ...
4 years ago (2016-12-07 06:31:11 UTC) #17
jochen (gone - plz use gerrit)
still lgtm
4 years ago (2016-12-07 15:37:13 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2550423002/20001
4 years ago (2016-12-07 15:52:29 UTC) #22
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years ago (2016-12-07 15:54:10 UTC) #25
commit-bot: I haz the power
4 years ago (2016-12-07 15:54:51 UTC) #27
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/ebe94192284e5f4437929a3256749fef7cb53329
Cr-Commit-Position: refs/heads/master@{#41556}

Powered by Google App Engine
This is Rietveld 408576698