New issue
Advanced search Search tips

Issue 843031 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: May 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocking:
issue 680046



Sign in to add a comment

Worker: Throw an ErrorEvent on module loading failure

Project Member Reported by nhiroki@chromium.org, May 15 2018

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>...
}
 
Status: Started (was: Assigned)
CL: https://chromium-review.googlesource.com/c/chromium/src/+/1058998
Project Member

Comment 2 by bugdroid1@chromium.org, 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

Labels: M-68
Status: Fixed (was: Started)

Sign in to add a comment