Bug 1562663 Comment 16 Edit History

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

I was assuming all the calls for workers would be triggered after the ExecutionReady() [1] is called. So, I tried to check the COEP header for workers from `ClientInfo` while postMessage'ing. However, the assumption is wrong.

```
// windows
let worker = new Worker();
worker.postMessage(); // [a]
```

[a] (on the main thread) can be called before the ExecutionReady(on worker thread) is executed and that might indicate that the attributes on WorkerPrivate object are not up-to-date yet. Also, I'm not sure if it's guaranteed that the response header is ready yet at [a]. If it's not, then we cannot check the COEP at this moment. We might need to block the postMessage until the header is ready. I might need to figure another way out to solve this.

[1] https://searchfox.org/mozilla-central/rev/325c1a707819602feff736f129cb36055ba6d94f/dom/workers/WorkerPrivate.cpp#3067
I was assuming all the calls for workers would be triggered after the WorkerPrivate::ExecutionReady() [1] is called. So, I tried to check the COEP header & agent cluster id for workers from `ClientInfo` while postMessage'ing. However, the assumption is wrong.

```
// windows
let worker = new Worker();
worker.postMessage(); // [a]
```

[a] (on the main thread) can be called before the ExecutionReady(on worker thread) is executed and that might indicate that the attributes on WorkerPrivate object are not up-to-date yet. Also, I'm not sure if it's guaranteed that the response header is ready yet at [a]. If it's not, then we cannot check the COEP at this moment. We might need to block the postMessage until the header is ready. I might need to figure another way out to solve this.

[1] https://searchfox.org/mozilla-central/rev/325c1a707819602feff736f129cb36055ba6d94f/dom/workers/WorkerPrivate.cpp#3067
I was assuming all the calls for workers would be run only after the WorkerPrivate::ExecutionReady() [1] is called. So, I tried to check the COEP header & agent cluster id for workers from `ClientInfo` while postMessage'ing. However, the assumption is wrong.

```
// windows
let worker = new Worker();
worker.postMessage(); // [a]
```

[a] (on the main thread) can be called before the ExecutionReady(on worker thread) is executed and that might indicate that the attributes on WorkerPrivate object are not up-to-date yet. Also, I'm not sure if it's guaranteed that the response header is ready yet at [a]. If it's not, then we cannot check the COEP at this moment. We might need to block the postMessage until the header is ready. I might need to figure another way out to solve this.

[1] https://searchfox.org/mozilla-central/rev/325c1a707819602feff736f129cb36055ba6d94f/dom/workers/WorkerPrivate.cpp#3067

Back to Bug 1562663 Comment 16