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

Issue 404513002: Propagate nested importScripts() error events outwards. (Closed)

Created:
6 years, 5 months ago by sof
Modified:
6 years, 5 months ago
CC:
blink-reviews, blink-reviews-bindings_chromium.org, arv+blink, abarth-chromium
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

Propagate nested importScripts() error events outwards. If importScripts() evaluation fails, we report the exception wrt the URL and location of the failing script. Extend that to handle the nested case, propagating any inner importScripts-induced error event outwards rather than construct a new one wrt the outer script URL. R=haraken@chromium.org BUG=394615 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=178432

Patch Set 1 #

Patch Set 2 : Clear error event before entering an importScripts() evaluation. #

Total comments: 7

Patch Set 3 : Chain the stack allocated WorkerGlobalScopeExecutionState to provide stack lifetime for ErrorEvents. #

Patch Set 4 : Fix RefPtr ownership bugaboo #

Total comments: 8

Patch Set 5 : Add explanatory comments re: stack chaining scheme. #

Patch Set 6 : Use STACK_ALLOCATED() #

Unified diffs Side-by-side diffs Delta from patch set Stats (+130 lines, -42 lines) Patch
A LayoutTests/fast/workers/resources/importScripts-1.js View 1 chunk +1 line, -0 lines 0 comments Download
A LayoutTests/fast/workers/resources/importScripts-2.js View 1 chunk +1 line, -0 lines 0 comments Download
A LayoutTests/fast/workers/resources/importScripts-3.js View 1 chunk +1 line, -0 lines 0 comments Download
A LayoutTests/fast/workers/resources/invalidScript.js View 1 chunk +1 line, -0 lines 0 comments Download
A LayoutTests/fast/workers/worker-nested-importScripts-error.html View 1 chunk +22 lines, -0 lines 0 comments Download
A LayoutTests/fast/workers/worker-nested-importScripts-error-expected.txt View 1 chunk +12 lines, -0 lines 0 comments Download
M Source/bindings/core/v8/WorkerScriptController.h View 1 2 3 4 5 5 chunks +17 lines, -22 lines 0 comments Download
M Source/bindings/core/v8/WorkerScriptController.cpp View 1 2 3 4 5 5 chunks +74 lines, -19 lines 0 comments Download
M Source/core/workers/WorkerGlobalScope.cpp View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 25 (0 generated)
sof
Please take a look.
6 years, 5 months ago (2014-07-17 13:52:00 UTC) #1
haraken
https://codereview.chromium.org/404513002/diff/20001/Source/bindings/core/v8/WorkerScriptController.cpp File Source/bindings/core/v8/WorkerScriptController.cpp (right): https://codereview.chromium.org/404513002/diff/20001/Source/bindings/core/v8/WorkerScriptController.cpp#newcode206 Source/bindings/core/v8/WorkerScriptController.cpp:206: m_errorEventFromImportedScript.clear(); Is it possible that m_errorEventFromImportedScript is not cleared ...
6 years, 5 months ago (2014-07-17 15:19:06 UTC) #2
sof
https://codereview.chromium.org/404513002/diff/20001/Source/bindings/core/v8/WorkerScriptController.cpp File Source/bindings/core/v8/WorkerScriptController.cpp (right): https://codereview.chromium.org/404513002/diff/20001/Source/bindings/core/v8/WorkerScriptController.cpp#newcode206 Source/bindings/core/v8/WorkerScriptController.cpp:206: m_errorEventFromImportedScript.clear(); On 2014/07/17 15:19:05, haraken wrote: > > Is ...
6 years, 5 months ago (2014-07-17 15:22:18 UTC) #3
haraken
https://codereview.chromium.org/404513002/diff/20001/Source/bindings/core/v8/WorkerScriptController.cpp File Source/bindings/core/v8/WorkerScriptController.cpp (right): https://codereview.chromium.org/404513002/diff/20001/Source/bindings/core/v8/WorkerScriptController.cpp#newcode206 Source/bindings/core/v8/WorkerScriptController.cpp:206: m_errorEventFromImportedScript.clear(); On 2014/07/17 15:22:17, sof wrote: > On 2014/07/17 ...
6 years, 5 months ago (2014-07-17 15:47:24 UTC) #4
sof
https://codereview.chromium.org/404513002/diff/20001/Source/bindings/core/v8/WorkerScriptController.cpp File Source/bindings/core/v8/WorkerScriptController.cpp (right): https://codereview.chromium.org/404513002/diff/20001/Source/bindings/core/v8/WorkerScriptController.cpp#newcode206 Source/bindings/core/v8/WorkerScriptController.cpp:206: m_errorEventFromImportedScript.clear(); On 2014/07/17 15:47:24, haraken wrote: > On 2014/07/17 ...
6 years, 5 months ago (2014-07-17 15:53:19 UTC) #5
haraken
https://codereview.chromium.org/404513002/diff/20001/Source/bindings/core/v8/WorkerScriptController.cpp File Source/bindings/core/v8/WorkerScriptController.cpp (right): https://codereview.chromium.org/404513002/diff/20001/Source/bindings/core/v8/WorkerScriptController.cpp#newcode206 Source/bindings/core/v8/WorkerScriptController.cpp:206: m_errorEventFromImportedScript.clear(); On 2014/07/17 15:53:19, sof wrote: > On 2014/07/17 ...
6 years, 5 months ago (2014-07-17 15:58:54 UTC) #6
sof
https://codereview.chromium.org/404513002/diff/20001/Source/bindings/core/v8/WorkerScriptController.cpp File Source/bindings/core/v8/WorkerScriptController.cpp (right): https://codereview.chromium.org/404513002/diff/20001/Source/bindings/core/v8/WorkerScriptController.cpp#newcode206 Source/bindings/core/v8/WorkerScriptController.cpp:206: m_errorEventFromImportedScript.clear(); On 2014/07/17 15:58:54, haraken wrote: > On 2014/07/17 ...
6 years, 5 months ago (2014-07-17 18:13:11 UTC) #7
sof
https://codereview.chromium.org/404513002/diff/20001/Source/bindings/core/v8/WorkerScriptController.cpp File Source/bindings/core/v8/WorkerScriptController.cpp (right): https://codereview.chromium.org/404513002/diff/20001/Source/bindings/core/v8/WorkerScriptController.cpp#newcode206 Source/bindings/core/v8/WorkerScriptController.cpp:206: m_errorEventFromImportedScript.clear(); On 2014/07/17 18:13:11, sof wrote: > On 2014/07/17 ...
6 years, 5 months ago (2014-07-17 22:05:31 UTC) #8
haraken
Mostly looks good. https://codereview.chromium.org/404513002/diff/60001/Source/bindings/core/v8/WorkerScriptController.cpp File Source/bindings/core/v8/WorkerScriptController.cpp (right): https://codereview.chromium.org/404513002/diff/60001/Source/bindings/core/v8/WorkerScriptController.cpp#newcode62 Source/bindings/core/v8/WorkerScriptController.cpp:62: DISALLOW_ALLOCATION(); Can we use STACK_ALLOCATED()? I ...
6 years, 5 months ago (2014-07-18 01:12:38 UTC) #9
sof
Thanks for having a second careful look also; comments below and in the updated patchset. ...
6 years, 5 months ago (2014-07-18 07:00:47 UTC) #10
haraken
https://codereview.chromium.org/404513002/diff/60001/Source/bindings/core/v8/WorkerScriptController.cpp File Source/bindings/core/v8/WorkerScriptController.cpp (right): https://codereview.chromium.org/404513002/diff/60001/Source/bindings/core/v8/WorkerScriptController.cpp#newcode62 Source/bindings/core/v8/WorkerScriptController.cpp:62: DISALLOW_ALLOCATION(); On 2014/07/18 07:00:46, sof wrote: > On 2014/07/18 ...
6 years, 5 months ago (2014-07-18 07:15:34 UTC) #11
sof
https://codereview.chromium.org/404513002/diff/60001/Source/bindings/core/v8/WorkerScriptController.cpp File Source/bindings/core/v8/WorkerScriptController.cpp (right): https://codereview.chromium.org/404513002/diff/60001/Source/bindings/core/v8/WorkerScriptController.cpp#newcode62 Source/bindings/core/v8/WorkerScriptController.cpp:62: DISALLOW_ALLOCATION(); On 2014/07/18 07:15:34, haraken wrote: > On 2014/07/18 ...
6 years, 5 months ago (2014-07-18 07:36:17 UTC) #12
haraken
LGTM.
6 years, 5 months ago (2014-07-18 07:40:15 UTC) #13
sof
Thanks for the review. We could consider moving WorkerScriptController to the heap at some point.
6 years, 5 months ago (2014-07-18 07:55:15 UTC) #14
sof
The CQ bit was checked by sigbjornf@opera.com
6 years, 5 months ago (2014-07-18 07:55:30 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sigbjornf@opera.com/404513002/100001
6 years, 5 months ago (2014-07-18 07:56:13 UTC) #16
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: linux_blink_dbg on tryserver.blink ...
6 years, 5 months ago (2014-07-18 09:01:56 UTC) #17
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 5 months ago (2014-07-18 10:04:53 UTC) #18
commit-bot: I haz the power
Try jobs failed on following builders: win_blink_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/win_blink_rel/builds/17679)
6 years, 5 months ago (2014-07-18 10:04:54 UTC) #19
sof
The CQ bit was checked by sigbjornf@opera.com
6 years, 5 months ago (2014-07-18 10:06:29 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sigbjornf@opera.com/404513002/100001
6 years, 5 months ago (2014-07-18 10:07:01 UTC) #21
sof
The CQ bit was unchecked by sigbjornf@opera.com
6 years, 5 months ago (2014-07-18 10:43:21 UTC) #22
sof
The CQ bit was checked by sigbjornf@opera.com
6 years, 5 months ago (2014-07-18 10:50:53 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sigbjornf@opera.com/404513002/100001
6 years, 5 months ago (2014-07-18 10:51:29 UTC) #24
commit-bot: I haz the power
6 years, 5 months ago (2014-07-18 11:13:49 UTC) #25
Message was sent while issue was closed.
Change committed as 178432

Powered by Google App Engine
This is Rietveld 408576698