Closed Bug 1188612 Opened 6 years ago Closed 6 years ago

Transferable errors should become NS_DOM_DATA_CLONE_ERR, not built-in spidermonkey errors.

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla43
Tracking Status
firefox43 --- fixed

People

(Reporter: khuey, Assigned: baku)

References

Details

Attachments

(1 file)

webmessaging/postMessage_dup_transfer_objects.htm tests that doing postMessage("blah", [foo, foo]); throws an NS_ERROR_DOM_DATA_CLONE_ERR.  Today it throws a builtin spidermonkey error.  There are a few parts to this:

1. We need to change the js engine to always call the error hook (in other words we need to ReportErrorTransferable for JSMSG_SC_DUP_TRANSFERABLE).
2. We need to change PostMessageEvent (and other structured clone callers) to actually use the error hook.
3. We need to test that the other ways that transferables can fail also get an NS_ERROR_DOM_DATA_CLONE_ERR.
I think baku is fixing 2 and 3 in one of his "make structured clone handling sane" bugs.
I take this bug.
Assignee: nobody → amarchesini
Blocks: 972973
Attached patch clone6.patchSplinter Review
Attachment #8640499 - Flags: review?(sphink)
Attachment #8640499 - Flags: review?(sphink) → review+
https://hg.mozilla.org/mozilla-central/rev/3b7e7fe8d581
Status: NEW → RESOLVED
Closed: 6 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.