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•4 years ago
|
||
Assignee | ||
Comment 2•4 years ago
|
||
Depends on D76686
Assignee | ||
Comment 3•4 years ago
|
||
Assignee | ||
Comment 4•4 years ago
|
||
Comment 5•4 years ago
|
||
Anything I can help with to land this?
Assignee | ||
Comment 6•4 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•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Pushed by ttung@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3a5540f2c69a Throw while de-serializing instead of serializing if message contains a shared memory object; r=baku,dom-workers-and-storage-reviewers,edenchuang https://hg.mozilla.org/integration/autoland/rev/49ec39152921 Update some tests to reflect the correct behaviors; r=annevk https://hg.mozilla.org/integration/autoland/rev/23f6ce8ab4ce Expected two test cases for extendable message event to pass; r=dom-workers-and-storage-reviewers,edenchuang
Comment 8•4 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
•