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

Issue 68563003: Create DOM exceptions in the correct context. (Closed)

Created:
7 years, 1 month ago by sof
Modified:
7 years, 1 month ago
CC:
blink-reviews, Nils Barth (inactive), kojih, arv+blink, jsbell+bindings_chromium.org, marja+watch_chromium.org, dglazkov+blink, dominicc+watchlist_chromium.org, adamk+blink_chromium.org, Nate Chapin, Inactive
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Create DOM exceptions in the correct context. If access to a cross-origin property or method is allowed, but it ends up throwing a DOM exception, arrange for the exception to be created in the context of the target property/method, not that of the caller/accessing context. Addressed by having ExceptionState keep a creation context, which is then passed along when creating the wrapper for the exception object. R=haraken@chromium.org BUG=235223 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=162010

Patch Set 1 #

Total comments: 2

Patch Set 2 : Rebase commit #

Patch Set 3 : Rebased onto df9a982fbe97 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+205 lines, -132 lines) Patch
A LayoutTests/fast/dom/cross-frame-accessor-throw.html View 1 chunk +64 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/cross-frame-accessor-throw-expected.txt View 1 chunk +6 lines, -0 lines 0 comments Download
M Source/bindings/scripts/code_generator_v8.pm View 1 2 16 chunks +16 lines, -16 lines 0 comments Download
M Source/bindings/templates/attributes.cpp View 1 2 3 chunks +3 lines, -3 lines 0 comments Download
M Source/bindings/templates/methods.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8SupportTestInterface.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestActiveDOMObject.cpp View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M Source/bindings/tests/results/V8TestEventTarget.cpp View 1 2 3 chunks +3 lines, -3 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterface.cpp View 1 2 5 chunks +5 lines, -5 lines 0 comments Download
M Source/bindings/tests/results/V8TestNamedConstructor.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestNode.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestObject.cpp View 1 2 24 chunks +24 lines, -24 lines 0 comments Download
M Source/bindings/tests/results/V8TestObjectPython.cpp View 1 2 9 chunks +9 lines, -9 lines 0 comments Download
M Source/bindings/tests/results/V8TestTypedefs.cpp View 1 2 7 chunks +7 lines, -7 lines 0 comments Download
M Source/bindings/v8/CustomElementConstructorBuilder.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/v8/ExceptionState.h View 2 chunks +5 lines, -3 lines 0 comments Download
M Source/bindings/v8/ExceptionState.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M Source/bindings/v8/ExceptionStatePlaceholder.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/v8/ExceptionStatePlaceholder.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/v8/V8Binding.cpp View 1 1 chunk +3 lines, -2 lines 0 comments Download
M Source/bindings/v8/V8Initializer.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/v8/V8ThrowException.h View 1 chunk +9 lines, -9 lines 0 comments Download
M Source/bindings/v8/V8ThrowException.cpp View 3 chunks +4 lines, -4 lines 0 comments Download
M Source/bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/v8/custom/V8CryptoCustom.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/v8/custom/V8DedicatedWorkerGlobalScopeCustom.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/v8/custom/V8DocumentCustom.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/v8/custom/V8HTMLCanvasElementCustom.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/v8/custom/V8HTMLFrameElementCustom.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M Source/bindings/v8/custom/V8HistoryCustom.cpp View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M Source/bindings/v8/custom/V8InjectedScriptHostCustom.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/v8/custom/V8MessagePortCustom.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/v8/custom/V8NodeCustom.cpp View 1 2 4 chunks +4 lines, -4 lines 0 comments Download
M Source/bindings/v8/custom/V8SQLTransactionCustom.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/v8/custom/V8SQLTransactionSyncCustom.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/v8/custom/V8SVGLengthCustom.cpp View 1 2 3 chunks +3 lines, -3 lines 0 comments Download
M Source/bindings/v8/custom/V8WindowCustom.cpp View 1 2 8 chunks +8 lines, -8 lines 0 comments Download
M Source/bindings/v8/custom/V8WorkerCustom.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/v8/custom/V8XMLHttpRequestCustom.cpp View 1 2 5 chunks +5 lines, -5 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
sof
Please have a look (if there people even better suited to review this context-related change, ...
7 years, 1 month ago (2013-11-11 10:21:51 UTC) #1
haraken
LGTM. We're using v8::Handle<v8::Object>() for a creation context in a lot of places in V8 ...
7 years, 1 month ago (2013-11-11 10:29:01 UTC) #2
sof
https://codereview.chromium.org/68563003/diff/1/Source/bindings/v8/V8ThrowException.h File Source/bindings/v8/V8ThrowException.h (right): https://codereview.chromium.org/68563003/diff/1/Source/bindings/v8/V8ThrowException.h#newcode46 Source/bindings/v8/V8ThrowException.h:46: return createDOMException(ec, String(), v8::Handle<v8::Object>(), isolate); On 2013/11/11 10:29:01, haraken ...
7 years, 1 month ago (2013-11-11 10:56:44 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sigbjornf@opera.com/68563003/1
7 years, 1 month ago (2013-11-11 10:58:22 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sigbjornf@opera.com/68563003/1
7 years, 1 month ago (2013-11-13 15:15:38 UTC) #5
commit-bot: I haz the power
Failed to apply patch for Source/bindings/tests/results/V8TestObject.cpp: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
7 years, 1 month ago (2013-11-13 15:15:53 UTC) #6
sof
Commit lingered in the cq for too long, causing conflicts when being re-applied. Possible to ...
7 years, 1 month ago (2013-11-13 16:44:47 UTC) #7
sof
Hmm, why is a change like 919a1ab82ccd019e1b325ed96c7b249d55e8c356 not held back while this is in the ...
7 years, 1 month ago (2013-11-14 06:22:42 UTC) #8
abarth-chromium
On 2013/11/14 06:22:42, sof wrote: > Hmm, why is a change like 919a1ab82ccd019e1b325ed96c7b249d55e8c356 not held ...
7 years, 1 month ago (2013-11-14 07:22:41 UTC) #9
sof
On 2013/11/14 07:22:41, abarth wrote: > On 2013/11/14 06:22:42, sof wrote: > > Hmm, why ...
7 years, 1 month ago (2013-11-14 07:25:40 UTC) #10
sof
If someone could look over the patchset #3 rebase, I'd be grateful.
7 years, 1 month ago (2013-11-14 08:16:14 UTC) #11
marja
On 2013/11/14 08:16:14, sof wrote: > If someone could look over the patchset #3 rebase, ...
7 years, 1 month ago (2013-11-14 08:43:07 UTC) #12
haraken
Still LGTM.
7 years, 1 month ago (2013-11-14 08:51:00 UTC) #13
sof
On 2013/11/14 08:43:07, marja wrote: > On 2013/11/14 08:16:14, sof wrote: > > If someone ...
7 years, 1 month ago (2013-11-14 08:52:41 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sigbjornf@opera.com/68563003/400001
7 years, 1 month ago (2013-11-14 08:53:59 UTC) #15
commit-bot: I haz the power
7 years, 1 month ago (2013-11-14 12:09:01 UTC) #16
Message was sent while issue was closed.
Change committed as 162010

Powered by Google App Engine
This is Rietveld 408576698