Worker: Throw an ErrorEvent on module loading failure |
||
Issue description
We should fix this TODO.
void WorkerModuleTreeClient::NotifyModuleTreeLoadFinished(
ModuleScript* module_script) {
if (!module_script) {
// Step 11: ... "If the algorithm asynchronously completes with null, queue
// a task to fire an event named error at worker, and abort these steps."
// ...
// TODO(nhiroki): Throw an ErrorEvent at the Worker object on the owner
// Document.
return;
}
// ...<snip>...
}
,
May 16 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/197a3b25666c262be7dff17eeb2d959dd6dc8b84 commit 197a3b25666c262be7dff17eeb2d959dd6dc8b84 Author: Hiroki Nakagawa <nhiroki@chromium.org> Date: Wed May 16 00:55:22 2018 Worker: Throw an ErrorEvent on a failure of module loading This behavior is defined in the HTML spec: Step 13: "If the algorithm asynchronously completes with null, queue a task to fire an event named error at worker, and return." https://html.spec.whatwg.org/multipage/workers.html#worker-processing-model An ErrorEvent is created on a worker thread, and passed to the main thread to dispatch it on a worker object in a document context. Bug: 843031 Change-Id: I1fd82cba1e02b1658bb2b556742f7a206ee754a7 Reviewed-on: https://chromium-review.googlesource.com/1058998 Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org> Reviewed-by: Kouhei Ueno <kouhei@chromium.org> Cr-Commit-Position: refs/heads/master@{#558903} [modify] https://crrev.com/197a3b25666c262be7dff17eeb2d959dd6dc8b84/third_party/WebKit/LayoutTests/external/wpt/workers/modules/dedicated-worker-import.html [modify] https://crrev.com/197a3b25666c262be7dff17eeb2d959dd6dc8b84/third_party/WebKit/LayoutTests/external/wpt/workers/modules/resources/dynamic-import-given-url-worker.js [add] https://crrev.com/197a3b25666c262be7dff17eeb2d959dd6dc8b84/third_party/WebKit/LayoutTests/external/wpt/workers/modules/resources/static-import-non-existent-script-worker.js [modify] https://crrev.com/197a3b25666c262be7dff17eeb2d959dd6dc8b84/third_party/blink/renderer/core/workers/worker_module_tree_client.cc
,
May 17 2018
|
||
►
Sign in to add a comment |
||
Comment 1 by nhiroki@chromium.org
, May 15 2018