Throw while de-serializing instead of serializing if message contains a shared memory object
Categories
(Core :: DOM: Service Workers, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox80 | --- | fixed |
People
(Reporter: tt, Assigned: tt)
References
(Blocks 1 open bug)
Details
Attachments
(3 files)
I found this while checking https://searchfox.org/mozilla-central/source/testing/web-platform/tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-serviceworker-failure.https.html
This test is marked to be expected to fail, but it should be expected to time out.
It fails because ServiceWorker::PostMessage
throws if the message object contains a shared memory object in the current implementation. So we failed at this line.
The correct behavior, for now, is to make this test timeout before we supported letting a ServiceWorker or SharedWorker lives in a cross-origin isolated environment.
I say time out because we hide the constructor of SharedArrayBuffer when it's not in the cross-origin isolated environment. So, we should fail at here and thus cause the test to time out.
I will update patches to update the expectation of the test and to fix this.
Assignee | ||
Comment 1•5 years ago
|
||
Assignee | ||
Comment 2•5 years ago
|
||
Depends on D76686
Assignee | ||
Comment 3•5 years ago
|
||
Assignee | ||
Comment 4•5 years ago
|
||
Comment 5•5 years ago
|
||
Anything I can help with to land this?
Assignee | ||
Comment 6•5 years ago
|
||
It's probably my fault that I didn't request review again after replying to :baku's question. (and I just did that).
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Comment 8•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/3a5540f2c69a
https://hg.mozilla.org/mozilla-central/rev/49ec39152921
https://hg.mozilla.org/mozilla-central/rev/23f6ce8ab4ce
Description
•