New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 663298 link

Starred by 3 users

Issue metadata

Status: Assigned
Owner:
Last visit > 30 days ago
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 662930



Sign in to add a comment

`new Worker()` should not throw when blocked by CSP.

Project Member Reported by mkwst@chromium.org, Nov 8 2016

Issue description

When we block a Worker or SharedWorker via CSP, we should fire the worker's `onerror` event rather than throwing in the constructor. That is, the following test should pass:

```
var w = new Worker(url);
w.onmessage = t.unreached_func("Ping should not be sent.");
Promise.all([
  waitUntilCSPEventForURL(t, reportedURL)
    .then(t.step_func(e => {
      assert_equals(e.blockedURI, reportedURL);
      assert_equals(e.violatedDirective, "worker-src");
      assert_equals(e.effectiveDirective, "worker-src");
    })),
  waitUntilEvent(w, "error")
]).then(t.step_func_done());
```

Currently, we throw, which is unfortunate.

Fixing dedicated workers is trivial. Fixing SharedWorkers is a nightmare.
 
Project Member

Comment 1 by sheriffbot@chromium.org, Nov 8 2017

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available. If you change it back, also remove the "Hotlist-Recharge-Cold" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 2 by est...@chromium.org, Nov 10 2017

Labels: Hotlist-EnamelAndFriendsFixIt

Comment 3 by jochen@chromium.org, Nov 10 2017

Owner: andypaicu@chromium.org
Status: Assigned (was: Untriaged)

Comment 4 by est...@chromium.org, Feb 18 2018

Labels: -Hotlist-EnamelAndFriendsFixIt

Sign in to add a comment