|
Correctly attribute exceptions thrown inside a Worker's imported scripts.
Currently, we have strange behavior when a script loaded into a worker
via 'importScripts()' throws an exception:
* Rather than reporting the exception's full details for same-origin
scripts, the exception is rethrown from the point at which
'importScripts()' is called. This makes it difficult to determine
where the exception actually occurred.
* Exceptions thrown from cross-origin scripts are incorrectly
sanitized: the message is generally "Uncaught undefined", and the
file/line/column all point to the 'importScripts()' call.
This patch corrects both cases: cross-origin exceptions are sanitized
in the same way that we sanitize non-worker exceptions (message of
"Script error.", blank file, line and column both set to 0). Same-origin
exceptions now contain accurate file/line/column information.
Note that this patch does not address the 'error' parameter for
same-origin exceptions.
BUG= 269538
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=155824
Total comments: 7
Total comments: 1
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+94 lines, -127 lines) |
Patch |
|
M |
LayoutTests/http/tests/workers/resources/worker-importscripts-onerror-crossorigin.js
|
View
|
1
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
LayoutTests/http/tests/workers/resources/worker-importscripts-onerror-redirect-to-crossorigin.js
|
View
|
1
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
LayoutTests/http/tests/workers/resources/worker-importscripts-onerror-sameorigin.js
|
View
|
1
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
LayoutTests/http/tests/workers/shared-worker-importScripts-expected.txt
|
View
|
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
LayoutTests/http/tests/workers/worker-importScripts-expected.txt
|
View
|
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
LayoutTests/http/tests/workers/worker-importScripts-onerror-crossorigin.html
|
View
|
1
|
1 chunk |
+12 lines, -11 lines |
0 comments
|
Download
|
|
M |
LayoutTests/http/tests/workers/worker-importScripts-onerror-crossorigin-expected.txt
|
View
|
1
|
1 chunk |
+10 lines, -7 lines |
0 comments
|
Download
|
|
M |
LayoutTests/http/tests/workers/worker-importScripts-onerror-redirect-to-crossorigin.html
|
View
|
1
|
1 chunk |
+12 lines, -12 lines |
0 comments
|
Download
|
|
M |
LayoutTests/http/tests/workers/worker-importScripts-onerror-redirect-to-crossorigin-expected.txt
|
View
|
1
|
1 chunk |
+10 lines, -7 lines |
0 comments
|
Download
|
|
M |
LayoutTests/http/tests/workers/worker-importScripts-onerror-sameorigin.html
|
View
|
1
|
1 chunk |
+10 lines, -9 lines |
0 comments
|
Download
|
|
M |
LayoutTests/http/tests/workers/worker-importScripts-onerror-sameorigin-expected.txt
|
View
|
1
|
1 chunk |
+9 lines, -6 lines |
0 comments
|
Download
|
|
D |
LayoutTests/platform/win/http/tests/workers/worker-importScripts-expected.txt
|
View
|
1
2
3
|
1 chunk |
+0 lines, -44 lines |
0 comments
|
Download
|
|
M |
Source/bindings/v8/WorkerScriptController.h
|
View
|
1
2
|
4 chunks |
+5 lines, -4 lines |
0 comments
|
Download
|
|
M |
Source/bindings/v8/WorkerScriptController.cpp
|
View
|
1
|
4 chunks |
+10 lines, -11 lines |
0 comments
|
Download
|
|
M |
Source/core/workers/WorkerGlobalScope.cpp
|
View
|
|
1 chunk |
+4 lines, -4 lines |
0 comments
|
Download
|
Total messages: 10 (0 generated)
|