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

Issue 31666 link

Starred by 155 users

Issue metadata

Status: Fixed
Owner:
Closed: Oct 23
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug

Blocked on: View detail
issue 692909
issue 803751
issue 829119


Show other hotlists

Hotlists containing this issue:
Top-Starred-Bugs


Sign in to add a comment

HTML5 nested workers are not supported in chromium

Reported by chunrong...@gmail.com, Jan 6 2010

Issue description

Chrome Version       : 4.0.265.0 (33933)
Other browsers tested: Firefox 3.x: OK

What steps will reproduce the problem?
1.  Access a webpage with below content
<html>
  <title>Test threads fibonacci</title>
  <body>
  <script type="text/javascript">
    var worker = new Worker("fibonacci1.js");
    worker.onmessage = function(event) {
      alert("Got: " + event.data);
    };
    worker.onerror = function(error) {
      alert("Worker error1: " + error.message);
      throw error;
    };
    worker.postMessage(10);
  </script>
  </body>
</html>

What is the expected result?
  Alert with "Got: 55", just as firefox 3.X does.

What happens instead?
  Alert with "Worker error1: Uncaught ReferenceError: Worker is not 
defined".


 
fibonacci1.js
601 bytes View Download
Labels: -Area-Undefined Area-WebKit WebKit-WebApps

Comment 2 by karen@chromium.org, Jan 11 2010

Labels: Mstone-5 karenianreview
Labels: -karenianreview
Status: Assigned
Dave - any chance you can look at this?

Comment 4 by levin@chromium.org, Jan 14 2010

Status: Available
   Alert with "Worker error1: Uncaught ReferenceError: Worker is not  defined".
means that the Worker object is not available in a Worker. This is true for all WebKit based browsers. Nested workers are not 
supported right now. 

Here are the relevant WebKit bugs (which currently are not moving forward):

https://bugs.webkit.org/show_bug.cgi?id=22723

https://bugs.webkit.org/show_bug.cgi?id=25212
https://bugs.webkit.org/show_bug.cgi?id=25215
https://bugs.webkit.org/show_bug.cgi?id=25255
https://bugs.webkit.org/show_bug.cgi?id=25270
https://bugs.webkit.org/show_bug.cgi?id=25273



Comment 5 by levin@chromium.org, Jan 14 2010

Summary: HTML5 nested workers are not supported in chromium
I understand that the nested workers are the main problem. Thanks.
Besides that I think Chromium also leads to confusion in parameter passing.
Say, if I change the worker scripts to a non-nested

onmessage = function(event) {
  var n = event.data;          
  postMessage(n+10);
};

Firefox can returns 20 for the URL, but Chromium only returns 1010?
I wonder if Chromium just regards the parameter as a string?
I also see that Chromium has problem to handle multiple parameters of a worker.
Below test cases just run OK in Firefox but have problem in Chromium.

(1) In HTML:
    var args = {
     x: 10,
     y: 20
    }
    worker.postMessage(args);

    In worker javascripts:
    onmessage = function(event) {
      var data = event.data;
      postMessage(data.x + data.y);
    };   
    
    Firefox  Alert: "Got: 30"
    Chromium Alert: "Got: NaN"

(2) In HTML:
    var args = [10, 20];
    worker.postMessage(args);

    In worker javascripts:
    onmessage = function(event) {
      var data = event.data;
      postMessage(data[0] + data[1]);
    };   
    
    Firefox  Alert: "Got: 30"
    Chromium Alert: "Got: 10"

(3) In HTML:
    var args = [10, 20];
    worker.postMessage(args);

    In worker javascripts:
    onmessage = function(event) {
      var data = event.data;
      postMessage(parseInt(data[0]) + parseInt(data[1]));
    };   
    
    Firefox  Alert: "Got: 30"
    Chromium Alert: "Got:  1"

I am not sure how Chromium handle this issue? Maybe I did something wrong?

Comment 8 by karen@chromium.org, Mar 8 2010

Status: Untriaged
dimitri to triage :)
Dmitry, can you triage this?
Labels: -Mstone-5 Mstone-X
Status: ExternalDependency
Not implemented upstream and it's unclear when it will be implemented. No demand to
justify complexity at the moment.

Comment 11 by levin@chromium.org, Jun 11 2011

Cc: chrome-d...@googlegroups.com
 Issue 50432  has been merged into this issue.

Comment 12 by levin@chromium.org, Jun 14 2011

Labels: Feature-Workers
 Issue 112428  has been merged into this issue.
Labels: WebKit-ID-22723
Project Member

Comment 15 by bugdroid1@chromium.org, Feb 26 2013

Labels: -WebKit-ID-22723 WebKit-ID-22723-NEW
https://bugs.webkit.org/show_bug.cgi?id=22723

Project Member

Comment 16 by bugdroid1@chromium.org, Mar 10 2013

Labels: -Area-WebKit -WebKit-WebApps Cr-Content-WebApps Cr-Content
Project Member

Comment 17 by bugdroid1@chromium.org, Apr 6 2013

Labels: -Cr-Content Cr-Blink

Comment 18 by fer...@gmail.com, Apr 10 2013

Now that Blink is separate from WebKit, this bug should be able to move forward. Correct?
Status: Available
Bulk status change for WebKit-ID-? bugs with ExternalDependency. These are now all Available. Feel free to return the status if the dependency is not on a WebKit contributor, but some other third party.

Comment 20 Deleted

Duplicate  issue 386691  is logged. I will check this, if no one else is checking it.

Comment 22 by dade...@gmail.com, Jul 22 2014

What about being able to use offscreen WebGL API?
Cc: nyerramilli@chromium.org
 Issue 386691  has been merged into this issue.
Cc: jochen@chromium.org

Comment 25 by joea...@gmail.com, Oct 21 2014

Anyone working on it?
Not currently. Lifecycle issues get a little hairy once you start launching shared workers from other shared workers as you end up having to manage non-empty document sets (http://www.w3.org/TR/workers/#the-worker-s-lifetime), and it's not clear that the added complexity is worth it when typically you can address the same use cases via MessagePorts + proxying worker creation via the parent document.

Comment 27 by rob@robwu.nl, Oct 22 2014

Labels: Cr-Blink-Workers
#26
According to the UseCounters, 92% of the Workers are normal workers and only 8% of them are Shared Workers (normal = 0.5594 [1], shared = 0.0483 [2]). If difficulty of implementation for shared workers is an issue, then this feature could be restricted to non-shared workers to make an implementation more feasible. Considering the fact that you're the first on this bug to mention shared workers, I think that most are happy with a functional solution for non-shared workers.


 [1] https://www.chromestatus.com/metrics/feature/popularity#WorkerStart
 [2] https://www.chromestatus.com/metrics/feature/popularity#SharedWorkerStart
I mention SharedWorkers, as that's really the only case (creating a worker from a shared worker) that can't easily be addressed by proxying worker creation to the parent document (since SharedWorkers don't have a single parent document).

Point taken that we could simplify the implementation by only handling nested dedicated workers created from dedicated workers, but that's the less interesting case since it's trivially addressed via a polyfill.
BTW, if there are use cases that can't be addressed by proxying worker creation back to the parent document, please outline them here as that would be useful in determining the priority of this work.
Proxying worker creation to a document is not something I'd ever do because it's incredibly brittle.

The application (SharedWorker) posts some data to be gzipped by the entangled Worker, but the user closes that tab, because they didn't know it was THE MAGIC TAB.
Since there's no disconnect event, some flaky timeout or polling eventually discovers the Worker went away. The application chooses the next oldest tab, and requests that it create a new Worker, then resubmits the workload.

There is no viable workaround for Chrome except just doing the work in the SharedWorker.
If it doesn't support sub-workers then it doesn't support them.
Re: #31 - we are in agreement, that proxying from a SharedWorker is hard to do since any individual parent document can go away, which is my point in comment #28 that SharedWorkers are the main motivation to build explicit nested worker support (harder to justify building support only for the simpler case of dedicated workers because in that case you have a guaranteed parent document and proxying becomes much more feasible).
Another workaround is each parent of the SharedWorker has code capable of spawning new workers. So they have distributed capability if one node fails, others can still spawn new workers. 

Comment 34 by tkent@chromium.org, Jun 26 2015

Labels: -Cr-Blink

Comment 35 by tkent@chromium.org, Jul 15 2015

Labels: -Cr-Content-WebApps
Labels: Hotlist-Recharge
This issue likely requires triage.  The current issue owner maybe inactive (i.e. hasn't fixed an issue in the last 30 days).  Thanks for helping out!

-Anthony
Your comment REALLY got my hopes up.
If anyone is struggling with this issue, you might be interested in the simple pollyfill I've created. You can find it at https://github.com/dmihal/Subworkers
Note the suggested workaround of creating workers from the main thread and communicating via MessagePort is impeded by  issue 334408 , which prevents efficient transfers of ArrayBuffer.
Is anyone working on this? It is supported in Firefox 3.5, Opera 11.60 and IE 10...
I've been watching this thread for a while and it appears that the answer
is to your question is no.

Comment 42 by stew...@neuron.com, Feb 29 2016

this is very unfortunate and I hope it gets addressed at some point. my app cannot use shared workers. it's passing large chunks of (cloned then zerocopy'd) data around for slicing. performance is good between document/workers and workers/workers.  parallelization is, therefore, only possible if a worker can spawn another set of workers.  going back through the parent creates untenable overhead and greatly complicates the code.
As noted before, the workaround is not a viable one for us since we need to transfer large amount of data and MessagePorts are currently not capable of doing a no-copy transfer of ArrayBuffer objects ( issue 344814 ). Proxying all communication through the main window is also complex to implement with possible performance issues (I haven't validated this but it feels like the main UI thread would become a bottleneck)
There is also the problem that the work around (list time I tried) doesn't
work in Firefox. Oddly enough both ways work in Edge and IE.

On Thu, Apr 7, 2016 at 12:39 PM, mathieu.hofman.citrix@gmail.com via
Monorail <monorail@chromium.org> wrote:

Comment 45 by shlat...@gmail.com, Aug 31 2016

https://github.com/dmihal/Subworkers workaround doesn't work in Chrome Apps
Cc: hajimehoshi@chromium.org dim...@chromium.org rbyers@chromium.org yhirano@chromium.org
Labels: -Hotlist-Recharge -mstone-X OS-All
Owner: ----
Status: Untriaged (was: Available)
What's the status here? This is important for allowing a ServiceWorker to do something expensive but not block the processing of network requests. For example if you wanted to transcode images, or if you wanted to transpile some other language into JS. Having to proxy through postMessage to a tab, then down into a SW is a very strange way to offload work from the SW, and might require extra round trips through the browser process of large data objects.

Also this bug is now over 6 years old, if we're not going to fix this we should have the spec changed to say this isn't actually supported by the web. Having MDN and the specs be wrong for 6+ years about what's possible on the web is bad for predictability, compat, and ergonomics.

Also note Firefox and Edge both support this (and have for many years), Safari and Chrome don't.

We need to make a decision here. :)
Cc: kinuko@chromium.org falken@chromium.org kenjibaheux@chromium.org horo@chromium.org
I don't remember if it was this thread or another but they basically said
'nofix' due to having to rip up a huge swath of their... something-or-other
code. I, too would like this to function according to spec as there are a
number of neat things that could be done, but alas.
Cc: nhiroki@chromium.org
Labels: -Pri-2 Pri-3
Status: Available (was: Untriaged)
This issue doesn’t immediately apply to service workers. The spec does not yet support service workers creating shared workers or dedicated workers. See https://github.com/w3c/ServiceWorker/issues/678 and https://github.com/whatwg/html/issues/411

In terms of priorities, we likely won’t get to this task except as part of adding support for service workers, after those spec issues are decided.

WontFix’ing this and changing the spec seems extreme since Firefox and Edge implement it (unless they are eager to remove support). Note that there are larger compat issues in the ecosystem: Safari and Android Chrome don't support shared workers at all (issue 154571).

nhiroki@ may be able to comment on what would be required to support this.
Blockedon: 692909
Labels: WorkerPainPoint

Comment 52 by dk...@chromium.org, May 31 2017

Cc: -falken@chromium.org domenic@chromium.org
It looks like https://github.com/whatwg/html/issues/411 is seeing active discussion/work, so this bug is making progress. @nhiroki or @domenic, can you provide a NextAction date on this bug of when it would be a good time to check back in on the status of discussions here?

Comment 53 by dk...@chromium.org, May 31 2017

Cc: -jochen@chromium.org falken@chromium.org
somehow accidentally removed falken - adding back in!

Comment 54 by dk...@chromium.org, May 31 2017

Cc: jochen@chromium.org
one last try to get the cc's right. sorry everyone!
I have to decompress multiple streams of compressed data, if I can do this in parallel instead of serial that would make a huge difference, but that needs nested workers...

Comment 56 by pppee...@gmail.com, Aug 17 2017

I try to spawn a sub-worker to compute something in worker, but got an error: ReferenceError: Worker is not defined.
The bug seem alive 7 years ago, has any plan to fix it?
Thanks!
Please be serious enough, or decent enough to take this bug really seriously, we are trying to make kickass apps on your platform but are struggling because of this amateur behavior of yours chromium!

7 years for something that important is immature, come on, admit it!

In my opinion you have just given up on the project.
Welcome to the party. This has been a continuous nofix that has stopped me,
for years, from making a library to make multi-threading easy.

Now with cryptocurrency and whatnot, this NEEDS to be fixed ASAP.
Comment #58 doesn't make any sense.  Worker creation requests just need to be proxied to the main JavaScript context.  Multi-threading wouldn't have been possible before SharedArrayBuffers, which only shipped this spring.

There is literally a polyfill to emulate nested workers Today in Chromium: https://github.com/dmihal/Subworkers

I'm all for having this bug eventually fixed, but having written worker-heavy code this isn't a blocker and certainly doesn't mean Google has "given up" on Chromium.
Thank you for this. I was unaware.
Please keep discussions respectful and constructive, as the box below the edit field says.

It's true this has been a bug for a long time and a bug people want to see fixed. We don't have a targeted milestone for a fix. There have been changes to the worker infrastructure recently that has nested workers more feasible but it's still not something that can be done immediately.

Also, as mentioned earlier in the thread, currently nested workers would only be very useful for shared workers. I would like to support shared workers on Android before investing more heavily in them. Additionally the service worker spec discussion is still ongoing.
The polyfill mentioned above is a nice effort... however, it does not speak to the reason one would spawn subworkers in the first place, which would be to offload the *messaging*.

If offloading work is the only problem, of course that could be done with multiple workers from the main thread (and sure, the "polyfill" could be a good way to coordinate those workers- but it is not really a polyfill for subworkers from this perspective, it's simply a neat library for communication from the main thread).

There are numerous other types of problems that do rely on offloading the messaging between workers, where that itself is a sort of bottleneck, and for those situations proper subworkers are needed.
I haven't looked at the specific polyfill, but does seem like you only should need to circle back to the main context to create workers - messaging can go directly between workers via MessageChannel/MessagePort?
Blockedon: 829119
Blockedon: 803751
Owner: japhet@chromium.org
Status: Started (was: Available)
Project Member

Comment 67 by bugdroid1@chromium.org, Jun 20 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3fab2ea25adb3374c3fc4f040df147f8541cf944

commit 3fab2ea25adb3374c3fc4f040df147f8541cf944
Author: Nate Chapin <japhet@chromium.org>
Date: Wed Jun 20 00:38:33 2018

Additional web-platform-tests for nested workers

Bug:  31666 
Change-Id: Ib4e935437d0bf08fabc6c83103e6979e1c7ac8c8
Reviewed-on: https://chromium-review.googlesource.com/1104953
Commit-Queue: Nate Chapin <japhet@chromium.org>
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#568666}
[rename] https://crrev.com/3fab2ea25adb3374c3fc4f040df147f8541cf944/third_party/WebKit/LayoutTests/external/wpt/workers/modules/dedicated-worker-import.any.js
[add] https://crrev.com/3fab2ea25adb3374c3fc4f040df147f8541cf944/third_party/WebKit/LayoutTests/external/wpt/workers/modules/dedicated-worker-import.any.worker-expected.txt
[add] https://crrev.com/3fab2ea25adb3374c3fc4f040df147f8541cf944/third_party/WebKit/LayoutTests/external/wpt/workers/nested_worker_close_from_parent_worker-expected.txt
[add] https://crrev.com/3fab2ea25adb3374c3fc4f040df147f8541cf944/third_party/WebKit/LayoutTests/external/wpt/workers/nested_worker_close_from_parent_worker.html
[add] https://crrev.com/3fab2ea25adb3374c3fc4f040df147f8541cf944/third_party/WebKit/LayoutTests/external/wpt/workers/nested_worker_close_self.worker-expected.txt
[add] https://crrev.com/3fab2ea25adb3374c3fc4f040df147f8541cf944/third_party/WebKit/LayoutTests/external/wpt/workers/nested_worker_close_self.worker.js
[add] https://crrev.com/3fab2ea25adb3374c3fc4f040df147f8541cf944/third_party/WebKit/LayoutTests/external/wpt/workers/nested_worker_importScripts.worker-expected.txt
[add] https://crrev.com/3fab2ea25adb3374c3fc4f040df147f8541cf944/third_party/WebKit/LayoutTests/external/wpt/workers/nested_worker_importScripts.worker.js
[add] https://crrev.com/3fab2ea25adb3374c3fc4f040df147f8541cf944/third_party/WebKit/LayoutTests/external/wpt/workers/nested_worker_sync_xhr.worker-expected.txt
[add] https://crrev.com/3fab2ea25adb3374c3fc4f040df147f8541cf944/third_party/WebKit/LayoutTests/external/wpt/workers/nested_worker_sync_xhr.worker.js
[add] https://crrev.com/3fab2ea25adb3374c3fc4f040df147f8541cf944/third_party/WebKit/LayoutTests/external/wpt/workers/nested_worker_terminate_from_document-expected.txt
[add] https://crrev.com/3fab2ea25adb3374c3fc4f040df147f8541cf944/third_party/WebKit/LayoutTests/external/wpt/workers/nested_worker_terminate_from_document.html
[add] https://crrev.com/3fab2ea25adb3374c3fc4f040df147f8541cf944/third_party/WebKit/LayoutTests/external/wpt/workers/support/parent_of_nested_worker.js
[add] https://crrev.com/3fab2ea25adb3374c3fc4f040df147f8541cf944/third_party/WebKit/LayoutTests/external/wpt/workers/support/sync_xhr.js
[add] https://crrev.com/3fab2ea25adb3374c3fc4f040df147f8541cf944/third_party/WebKit/LayoutTests/external/wpt/workers/support/sync_xhr_target.xml

Project Member

Comment 68 by bugdroid1@chromium.org, Jun 22 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2e7ca4425ffecde2df9bd81e8b98c6baa5af9c10

commit 2e7ca4425ffecde2df9bd81e8b98c6baa5af9c10
Author: Kinuko Yasuda <kinuko@chromium.org>
Date: Fri Jun 22 00:02:12 2018

Add ServiceWorkerWorkerClientRegistry mojo interface

So that later it can be used to register a new ServiceWorkerWorkerClient
from non-main-thread for nested workers.

No behavior changes (no nested worker plumbing added here)

Bug:  31666 
Change-Id: I0a9b52b47a5eb5eb234da5c18a6bf15c65e14d2c
Reviewed-on: https://chromium-review.googlesource.com/1107580
Commit-Queue: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Cr-Commit-Position: refs/heads/master@{#569461}
[modify] https://crrev.com/2e7ca4425ffecde2df9bd81e8b98c6baa5af9c10/content/common/service_worker/service_worker_provider.mojom
[modify] https://crrev.com/2e7ca4425ffecde2df9bd81e8b98c6baa5af9c10/content/renderer/render_frame_impl.cc
[modify] https://crrev.com/2e7ca4425ffecde2df9bd81e8b98c6baa5af9c10/content/renderer/service_worker/service_worker_provider_context.cc
[modify] https://crrev.com/2e7ca4425ffecde2df9bd81e8b98c6baa5af9c10/content/renderer/service_worker/service_worker_provider_context.h
[modify] https://crrev.com/2e7ca4425ffecde2df9bd81e8b98c6baa5af9c10/content/renderer/service_worker/worker_fetch_context_impl.cc
[modify] https://crrev.com/2e7ca4425ffecde2df9bd81e8b98c6baa5af9c10/content/renderer/service_worker/worker_fetch_context_impl.h
[modify] https://crrev.com/2e7ca4425ffecde2df9bd81e8b98c6baa5af9c10/content/renderer/shared_worker/embedded_shared_worker_stub.cc

Project Member

Comment 69 by bugdroid1@chromium.org, Jun 25 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3c916a5e84db524eadcec06d32b6e2a884f6c4c7

commit 3c916a5e84db524eadcec06d32b6e2a884f6c4c7
Author: Hiroki Nakagawa <nhiroki@chromium.org>
Date: Mon Jun 25 08:04:45 2018

Worker: Update test expectations for external/wpt/workers/semantics/multiple-workers/

This addresses recent WPT-side changes:
https://github.com/web-platform-tests/wpt/issues/11222

These files test nested workers on dedicated workers and shared workers that
haven't been implemented yet in Chromium.

Bug:  31666 , 655458
Change-Id: I52f75c3ee2e77b03861cdf6fb0e7d07de93c9d0f
Reviewed-on: https://chromium-review.googlesource.com/1113160
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
Cr-Commit-Position: refs/heads/master@{#569980}
[modify] https://crrev.com/3c916a5e84db524eadcec06d32b6e2a884f6c4c7/third_party/WebKit/LayoutTests/TestExpectations
[add] https://crrev.com/3c916a5e84db524eadcec06d32b6e2a884f6c4c7/third_party/WebKit/LayoutTests/external/wpt/workers/semantics/multiple-workers/003-expected.txt
[add] https://crrev.com/3c916a5e84db524eadcec06d32b6e2a884f6c4c7/third_party/WebKit/LayoutTests/external/wpt/workers/semantics/multiple-workers/005-expected.txt
[add] https://crrev.com/3c916a5e84db524eadcec06d32b6e2a884f6c4c7/third_party/WebKit/LayoutTests/external/wpt/workers/semantics/multiple-workers/006-expected.txt

Project Member

Comment 70 by bugdroid1@chromium.org, Jun 26 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/cee84faafa0b7386d71bce4311b8579bc4dcae41

commit cee84faafa0b7386d71bce4311b8579bc4dcae41
Author: Matt Falkenhagen <falken@chromium.org>
Date: Tue Jun 26 02:35:02 2018

service worker: Tweak comment about ServiceWorkerWorkerClientRegistry.

Rely on mojom to document the individual functions, and move the
higher-level explanation to the class-level.

Bug:  31666 
Change-Id: Ie493492db6616c7b967faf6a8d961c6f97dc9a10
Reviewed-on: https://chromium-review.googlesource.com/1113400
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Matt Falkenhagen <falken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#570303}
[modify] https://crrev.com/cee84faafa0b7386d71bce4311b8579bc4dcae41/content/renderer/service_worker/service_worker_provider_context.h

Project Member

Comment 72 by bugdroid1@chromium.org, Jul 12

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/62cb57146b83dcd0b2b2add48c4cfe02b3d770b9

commit 62cb57146b83dcd0b2b2add48c4cfe02b3d770b9
Author: Nate Chapin <japhet@chromium.org>
Date: Thu Jul 12 20:36:49 2018

Clone service worker objects to nested workers

Bug:  31666 
Change-Id: I8db30dee7c6b72430eb4083536fca73606de76e8
Reviewed-on: https://chromium-review.googlesource.com/1130101
Commit-Queue: Nate Chapin <japhet@chromium.org>
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#574707}
[modify] https://crrev.com/62cb57146b83dcd0b2b2add48c4cfe02b3d770b9/content/renderer/loader/web_worker_fetch_context_impl.cc
[modify] https://crrev.com/62cb57146b83dcd0b2b2add48c4cfe02b3d770b9/content/renderer/loader/web_worker_fetch_context_impl.h
[modify] https://crrev.com/62cb57146b83dcd0b2b2add48c4cfe02b3d770b9/content/renderer/render_frame_impl.cc
[add] https://crrev.com/62cb57146b83dcd0b2b2add48c4cfe02b3d770b9/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/claim-worker-fetch.https-expected.txt
[modify] https://crrev.com/62cb57146b83dcd0b2b2add48c4cfe02b3d770b9/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/claim-worker-fetch.https.html
[add] https://crrev.com/62cb57146b83dcd0b2b2add48c4cfe02b3d770b9/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/claim-nested-worker-fetch-iframe.html
[add] https://crrev.com/62cb57146b83dcd0b2b2add48c4cfe02b3d770b9/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/claim-nested-worker-fetch-parent-worker.js
[add] https://crrev.com/62cb57146b83dcd0b2b2add48c4cfe02b3d770b9/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/nested_load_worker.js
[modify] https://crrev.com/62cb57146b83dcd0b2b2add48c4cfe02b3d770b9/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/worker-interception-iframe.https.html

Project Member

Comment 73 by bugdroid1@chromium.org, Jul 18

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/304237d65a5dbeaca92a2a9a276b4cb903b5ad14

commit 304237d65a5dbeaca92a2a9a276b4cb903b5ad14
Author: Nate Chapin <japhet@chromium.org>
Date: Wed Jul 18 21:41:10 2018

Implement nested dedicated workers

This change exposes the Worker() constructor to dedicated workers,
allowing them to create descendant workers.

Chrome feature entry:
https://www.chromestatus.com/feature/6080438103703552

Intent to Implement and Ship:
https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/KZx0i3e5nZM

Bug:  31666 
Change-Id: I449978641f7ee4afba2a1087da91d84b78559abb
Reviewed-on: https://chromium-review.googlesource.com/953746
Reviewed-by: Ojan Vafai <ojan@chromium.org>
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Commit-Queue: Nate Chapin <japhet@chromium.org>
Cr-Commit-Position: refs/heads/master@{#576225}
[modify] https://crrev.com/304237d65a5dbeaca92a2a9a276b4cb903b5ad14/content/browser/dedicated_worker/dedicated_worker_host.cc
[modify] https://crrev.com/304237d65a5dbeaca92a2a9a276b4cb903b5ad14/content/child/runtime_features.cc
[modify] https://crrev.com/304237d65a5dbeaca92a2a9a276b4cb903b5ad14/content/public/app/mojo/content_browser_manifest.json
[modify] https://crrev.com/304237d65a5dbeaca92a2a9a276b4cb903b5ad14/third_party/WebKit/LayoutTests/TestExpectations
[modify] https://crrev.com/304237d65a5dbeaca92a2a9a276b4cb903b5ad14/third_party/WebKit/LayoutTests/VirtualTestSuites
[modify] https://crrev.com/304237d65a5dbeaca92a2a9a276b4cb903b5ad14/third_party/WebKit/LayoutTests/external/wpt/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/nested-worker-success-dedicatedworker-expected.txt
[modify] https://crrev.com/304237d65a5dbeaca92a2a9a276b4cb903b5ad14/third_party/WebKit/LayoutTests/external/wpt/html/infrastructure/urls/resolving-urls/query-encoding/utf-8-expected.txt
[modify] https://crrev.com/304237d65a5dbeaca92a2a9a276b4cb903b5ad14/third_party/WebKit/LayoutTests/external/wpt/html/infrastructure/urls/resolving-urls/query-encoding/windows-1251-expected.txt
[modify] https://crrev.com/304237d65a5dbeaca92a2a9a276b4cb903b5ad14/third_party/WebKit/LayoutTests/external/wpt/html/infrastructure/urls/resolving-urls/query-encoding/windows-1252-expected.txt
[modify] https://crrev.com/304237d65a5dbeaca92a2a9a276b4cb903b5ad14/third_party/WebKit/LayoutTests/external/wpt/secure-contexts/basic-dedicated-worker-expected.txt
[delete] https://crrev.com/fac6d427d8f345a6baf2cc3c64f8d0c7d8ec7472/third_party/WebKit/LayoutTests/external/wpt/secure-contexts/basic-dedicated-worker.https-expected.txt
[delete] https://crrev.com/fac6d427d8f345a6baf2cc3c64f8d0c7d8ec7472/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/claim-worker-fetch.https-expected.txt
[modify] https://crrev.com/304237d65a5dbeaca92a2a9a276b4cb903b5ad14/third_party/WebKit/LayoutTests/external/wpt/websockets/Create-on-worker-shutdown.any.worker-expected.txt
[modify] https://crrev.com/304237d65a5dbeaca92a2a9a276b4cb903b5ad14/third_party/WebKit/LayoutTests/external/wpt/workers/constructors/Worker/expected-self-properties.worker-expected.txt
[delete] https://crrev.com/fac6d427d8f345a6baf2cc3c64f8d0c7d8ec7472/third_party/WebKit/LayoutTests/external/wpt/workers/modules/dedicated-worker-import-blob-url.any.worker-expected.txt
[delete] https://crrev.com/fac6d427d8f345a6baf2cc3c64f8d0c7d8ec7472/third_party/WebKit/LayoutTests/external/wpt/workers/modules/dedicated-worker-import-data-url.any.worker-expected.txt
[delete] https://crrev.com/fac6d427d8f345a6baf2cc3c64f8d0c7d8ec7472/third_party/WebKit/LayoutTests/external/wpt/workers/modules/dedicated-worker-import.any.worker-expected.txt
[delete] https://crrev.com/fac6d427d8f345a6baf2cc3c64f8d0c7d8ec7472/third_party/WebKit/LayoutTests/external/wpt/workers/nested_worker.worker-expected.txt
[delete] https://crrev.com/fac6d427d8f345a6baf2cc3c64f8d0c7d8ec7472/third_party/WebKit/LayoutTests/external/wpt/workers/nested_worker_close_from_parent_worker-expected.txt
[delete] https://crrev.com/fac6d427d8f345a6baf2cc3c64f8d0c7d8ec7472/third_party/WebKit/LayoutTests/external/wpt/workers/nested_worker_close_self.worker-expected.txt
[delete] https://crrev.com/fac6d427d8f345a6baf2cc3c64f8d0c7d8ec7472/third_party/WebKit/LayoutTests/external/wpt/workers/nested_worker_importScripts.worker-expected.txt
[delete] https://crrev.com/fac6d427d8f345a6baf2cc3c64f8d0c7d8ec7472/third_party/WebKit/LayoutTests/external/wpt/workers/nested_worker_sync_xhr.worker-expected.txt
[delete] https://crrev.com/fac6d427d8f345a6baf2cc3c64f8d0c7d8ec7472/third_party/WebKit/LayoutTests/external/wpt/workers/nested_worker_terminate_from_document-expected.txt
[modify] https://crrev.com/304237d65a5dbeaca92a2a9a276b4cb903b5ad14/third_party/WebKit/LayoutTests/external/wpt/workers/semantics/interface-objects/001.worker-expected.txt
[add] https://crrev.com/304237d65a5dbeaca92a2a9a276b4cb903b5ad14/third_party/WebKit/LayoutTests/http/tests/devtools/console/nested-worker-eval-contains-stack-expected.txt
[add] https://crrev.com/304237d65a5dbeaca92a2a9a276b4cb903b5ad14/third_party/WebKit/LayoutTests/http/tests/devtools/console/nested-worker-eval-contains-stack.js
[add] https://crrev.com/304237d65a5dbeaca92a2a9a276b4cb903b5ad14/third_party/WebKit/LayoutTests/http/tests/devtools/console/resources/nested-worker.js
[add] https://crrev.com/304237d65a5dbeaca92a2a9a276b4cb903b5ad14/third_party/WebKit/LayoutTests/virtual/off-main-thread-websocket/external/wpt/websockets/Create-on-worker-shutdown.any.worker-expected.txt
[add] https://crrev.com/304237d65a5dbeaca92a2a9a276b4cb903b5ad14/third_party/WebKit/LayoutTests/virtual/sharedarraybuffer/external/wpt/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/nested-worker-success-dedicatedworker-expected.txt
[modify] https://crrev.com/304237d65a5dbeaca92a2a9a276b4cb903b5ad14/third_party/WebKit/LayoutTests/virtual/stable/webexposed/global-interface-listing-dedicated-worker-expected.txt
[modify] https://crrev.com/304237d65a5dbeaca92a2a9a276b4cb903b5ad14/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-dedicated-worker-expected.txt
[modify] https://crrev.com/304237d65a5dbeaca92a2a9a276b4cb903b5ad14/third_party/blink/common/features.cc
[modify] https://crrev.com/304237d65a5dbeaca92a2a9a276b4cb903b5ad14/third_party/blink/public/common/features.h
[modify] https://crrev.com/304237d65a5dbeaca92a2a9a276b4cb903b5ad14/third_party/blink/public/platform/web_runtime_features.h
[modify] https://crrev.com/304237d65a5dbeaca92a2a9a276b4cb903b5ad14/third_party/blink/renderer/core/workers/worker.idl
[modify] https://crrev.com/304237d65a5dbeaca92a2a9a276b4cb903b5ad14/third_party/blink/renderer/platform/exported/web_runtime_features.cc
[modify] https://crrev.com/304237d65a5dbeaca92a2a9a276b4cb903b5ad14/third_party/blink/renderer/platform/runtime_enabled_features.json5

Status: Fixed (was: Started)
Closing this, as we have shipped support for dedicated->dedicated worker nesting.

I don't think we have a plan for supporting nesting involving shared workers at this time. If that changes, I'll open a separate issue.
Labels: M-69
For the record, this feature is available from M69:
https://www.chromestatus.com/feature/6080438103703552
Project Member

Comment 76 by bugdroid1@chromium.org, Nov 15

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/72c20930dcc9f8a9ef8be14c11d212c8e5ab8b3f

commit 72c20930dcc9f8a9ef8be14c11d212c8e5ab8b3f
Author: Hiroki Nakagawa <nhiroki@chromium.org>
Date: Thu Nov 15 03:22:56 2018

Worker: Remove a runtime flag for nested dedicated workers

Nested dedicated workers has been enabled by default since Chrome 69:
https://www.chromestatus.com/feature/6080438103703552

Bug:  31666 
Change-Id: I12785dd8c1d5582ae0d069b5b6993ad50c6be9b3
Reviewed-on: https://chromium-review.googlesource.com/c/1325596
Reviewed-by: Nate Chapin <japhet@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
Cr-Commit-Position: refs/heads/master@{#608244}
[modify] https://crrev.com/72c20930dcc9f8a9ef8be14c11d212c8e5ab8b3f/content/child/runtime_features.cc
[modify] https://crrev.com/72c20930dcc9f8a9ef8be14c11d212c8e5ab8b3f/third_party/blink/common/features.cc
[modify] https://crrev.com/72c20930dcc9f8a9ef8be14c11d212c8e5ab8b3f/third_party/blink/public/common/features.h
[modify] https://crrev.com/72c20930dcc9f8a9ef8be14c11d212c8e5ab8b3f/third_party/blink/public/platform/web_runtime_features.h
[modify] https://crrev.com/72c20930dcc9f8a9ef8be14c11d212c8e5ab8b3f/third_party/blink/renderer/core/workers/worker.idl
[modify] https://crrev.com/72c20930dcc9f8a9ef8be14c11d212c8e5ab8b3f/third_party/blink/renderer/platform/exported/web_runtime_features.cc
[modify] https://crrev.com/72c20930dcc9f8a9ef8be14c11d212c8e5ab8b3f/third_party/blink/renderer/platform/runtime_enabled_features.json5

Sign in to add a comment