Bug 1247687 Comment 10 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

As part of overhauling the scriptloader to support modules we'd also like to try and reduce code duplication between the worker scriptloader and the main-thread window scriptloader.  Much of the complexity in the worker scriptloader relates to 2 things:
1. Channels can't be opened on worker threads.  Bug 1528285 will address this so we want to wait on that.
2. Loading ServiceWorker scripts from Cache API storage does not look like using a channel.  For this, a tentative plan to investigate is to create a dedicated channel type for loading scripts from the Cache API.  This could help normalize things from the script loader's perspective.
  - This may or may not also dovetail with the need for there to be a Worker equivalent to DocumentChannel for ServiceWorker and SharedWorker cases where we need to know the COEP header value before we select the process to spin up the worker.
As part of overhauling the scriptloader to support modules we'd also like to try and reduce code duplication between the worker scriptloader and the main-thread window scriptloader.  Much of the complexity in the worker scriptloader relates to 2 things:
1. Channels can't be opened on worker threads.  Bug 1528285 will address this so we want to wait on that.
2. Loading ServiceWorker scripts from Cache API storage does not look like using a channel.  For this, a tentative plan to investigate is to create a dedicated channel type for loading scripts from the Cache API.  This could help normalize things from the script loader's perspective.
    - This may or may not also dovetail with the need for there to be a Worker equivalent to DocumentChannel for ServiceWorker and SharedWorker cases where we need to know the COEP header value before we select the process to spin up the worker.

Back to Bug 1247687 Comment 10