Closed Bug 1186544 Opened 9 years ago Closed 9 years ago

A better test suite for StructuredCloneAlgorithm

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla42
Tracking Status
firefox42 --- fixed

People

(Reporter: baku, Assigned: baku)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 2 obsolete files)

Attached patch test.patch (obsolete) — Splinter Review
The idea of this test is to support any clonable/transferring object in any context. Currently it supports: 1. window-to-window 2. window-to-iframe 3. window-to-cross-origin-iframe I'll update the patches of any sub-issue of bug 972973 in order to extend this test.
Attachment #8637354 - Flags: review?(bugs)
Why not testharness.js? This sounds extremely useful for Servo as well.
Attached patch test.patch (obsolete) — Splinter Review
Here we test messageport too.
Attachment #8637354 - Attachment is obsolete: true
Attachment #8637354 - Flags: review?(bugs)
Attachment #8638587 - Flags: review?(bugs)
Comment on attachment 8638587 [details] [diff] [review] test.patch Otherwise looking good, but RCTCertificate handling would be still possibly thread-unsafe. Could you fix that and then file a followup to sort out how RCTCertificate should behave when one tries to receive it on workers.
Attachment #8638587 - Flags: review?(bugs) → review-
Attached patch test.patchSplinter Review
No needs to throw an exception manually because if the Write/Read functions return null/false, the error callback will be used.
Attachment #8638587 - Attachment is obsolete: true
Attachment #8639372 - Flags: review?(bugs)
Blocks: 1187996
Blocks: 1187998
Comment on attachment 8639372 [details] [diff] [review] test.patch And please file a followup for each if (!NS_IsMainThread()) { case in the Read. And perhaps those MOZ_ASSERTs could have some message that it isn't a critical bug, but someone is trying to use an unsupported feature.
Attachment #8639372 - Flags: review?(bugs) → review+
Blocks: 1188005
One thing to think about - GC/CC after message has been sent but before it has been receiced. That might prevent certain types of regressions. No need to do in this bug.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: