commit | 3db608a7ff8c71e0d4e4584645af1352b62a25e3 | [log] [tgz] |
---|---|---|
author | Hiroki Nakagawa <nhiroki@chromium.org> | Thu Dec 13 08:23:14 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Thu Dec 13 08:23:14 2018 |
tree | 3405ef40297921f2bef2ada93a9e1983dc3f05a2 | |
parent | 912523f0f7bea33b9dd4817dcf4e182851361e77 [diff] |
Worker: Add a new error reporting path for top-level worker script fetch Before this CL, unhandled runtime exceptions on WorkerGlobalScope and errors on off-the-main-thread top-level worker script fetch are reported to the parent execution context in the same way. According to the HTML spec, this was wrong. For unhandled runtime exceptions, if it's also unhandled by the parent execution context, that should be propagated to the grandparent execution context and so forth. See the "Runtime script errors" algorithm: https://html.spec.whatwg.org/multipage/workers.html#runtime-script-errors-2 On the other hand, for script fetch erros, that should just dispatch an error event at the worker object in the parent execution context: "Queue a task to fire an event named error at worker." https://html.spec.whatwg.org/multipage/workers.html#worker-processing-model This CL adds a new error reporting path for errors on top-level worker script fetch (WorkerReportingProxy::DidFailToFetchClassicScript()). This change fixes web_tests failures when off-the-main-thread worker script fetch is enabled. In those tests, script fetch errors are treated as unhandled exceptions and the test harness complains it. Note that this change affects only off-the-main-thread worker script fetch. On-the-main-thread worker script fetch correctly dispatches the error event without the propagation before this change (see DedicatedWorker::OnFinished()). Change-Id: I093dc024a817516b88d062bcefc978935320418d Bug: 835717 Reviewed-on: https://chromium-review.googlesource.com/c/1370230 Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org> Reviewed-by: Matt Falkenhagen <falken@chromium.org> Cr-Commit-Position: refs/heads/master@{#616242}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .