Maybe we should have a chat about what we need here for a minimum viable product and what we need long term. At a minimum I think we need these things: 1. Dedicated workers need to respect COEP of their creator. Dedicated workers have ways of fetching opaque responses and therefore need to inherit COEP (or we block loading if COEP is not defined for them; I suppose we could go with either design, this isn't settled in stone). 2. We need to ensure that service workers end up in a separate process from the process that has the "allow postMessage() for SharedArrayBuffer" bit set (i.e., a document that opted in with COOP + COEP). 3. If a service worker feeds an opaque response to a process that has the bit set, ensure it has the relevant header and otherwise network error before the response reaches the process. In the future we want: 1. Allowing shared/service workers to opt into COEP themselves so they can use SharedArrayBuffer in threaded fashion as well. (I'm not actually sure if we allow nested dedicated workers yet in these worker types. If that's not a thing that would also need to become a thing for this to be truly useful.) Background reading on COOP and COEP: https://docs.google.com/document/d/1zDlfvfTJ_9e8Jdc8ehuV4zMEu9ySMCiTGMS9y0GU92k/edit. Happy to chat more in person if that would help.
Bug 1532287 Comment 4 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
Maybe we should have a chat about what we need here for a minimum viable product and what we need long term. At a minimum I think we need these things: 1. Dedicated workers need to respect COEP of their creator. Dedicated workers have ways of fetching opaque responses and therefore need to block loading if COEP is not set for them. (They should not inherit COEP as that leads to inconsistent fetching state.) 2. We need to ensure that service workers end up in a separate process from the process that has the "allow postMessage() for SharedArrayBuffer" bit set (i.e., a document that opted in with COOP + COEP). 3. If a service worker feeds an opaque response to a process that has the bit set, ensure it has the relevant header and otherwise network error before the response reaches the process. In the future we want: 1. Allowing shared/service workers to opt into COEP themselves so they can use SharedArrayBuffer in threaded fashion as well. (I'm not actually sure if we allow nested dedicated workers yet in these worker types. If that's not a thing that would also need to become a thing for this to be truly useful.) Background reading on COOP and COEP: https://docs.google.com/document/d/1zDlfvfTJ_9e8Jdc8ehuV4zMEu9ySMCiTGMS9y0GU92k/edit. Happy to chat more in person if that would help.