Incorrect exception when SharedArrayBuffer cannot be serialized
Categories
(Core :: DOM: postMessage, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox75 | --- | fixed |
People
(Reporter: annevk, Assigned: tt)
References
(Blocks 1 open bug)
Details
Attachments
(4 files)
WPT html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/no-coop-coep.https.any.js
(run as html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/no-coop-coep.https.any.html
for instance) shows that we throw a TypeError rather than a DataCloneError.
html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/serialization-via-history.https.html
also tests this and a number of other files in that directory do too.
Reporter | ||
Comment 1•6 years ago
|
||
This is also a problem for ArrayBuffer
objects as per html/infrastructure/safe-passing-of-structured-data/transfer-errors.window.html
.
Assignee | ||
Comment 2•6 years ago
|
||
(In reply to Anne (:annevk) from comment #0)
WPT
html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/no-coop-coep.https.any.js
(run ashtml/infrastructure/safe-passing-of-structured-data/shared-array-buffers/no-coop-coep.https.any.html
for instance) shows that we throw a TypeError rather than a DataCloneError.
html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/serialization-via-history.https.html
also tests this and a number of other files in that directory do too.
The problem is probably because, for instance, we throw a JS exception here before we throw a DOM exception.
The question is that if we want to keep the error message for COOP and COEP headers, we might need to expose a new method in Spidermonkey to get the error message from a JSException and then throw that with DATA_CLONE_ERR.
Assignee | ||
Comment 3•6 years ago
|
||
Assignee | ||
Comment 4•6 years ago
|
||
Updated•6 years ago
|
Assignee | ||
Comment 5•6 years ago
|
||
Depends on D62232
Assignee | ||
Comment 6•6 years ago
|
||
Updated•6 years ago
|
Assignee | ||
Comment 7•6 years ago
|
||
Hmm, there seem to have too many cases where we fail to serialize/deserialize a buffer and JS side doesn't call the error callback. So, I will probably remove the assertion before throwing (for ensuring error callback must propagate the message to DOM side while throwing).
Here is the try with the newest patch and puls removing the assertion to ensure mErrorMessage
is not empty right before throwing:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=e21ce6f32ff4666e80923f6a9b57b351968a3e4c
Assignee | ||
Comment 8•6 years ago
|
||
Depends on D62260
Assignee | ||
Comment 9•6 years ago
|
||
Depends on D62881
Assignee | ||
Comment 10•6 years ago
|
||
Assignee | ||
Comment 11•6 years ago
|
||
Comment 12•5 years ago
|
||
Comment 13•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/6f2315156e4f
https://hg.mozilla.org/mozilla-central/rev/5cfb3def4827
https://hg.mozilla.org/mozilla-central/rev/819fac5523c2
https://hg.mozilla.org/mozilla-central/rev/ee476560631f
Description
•