A better test suite for StructuredCloneAlgorithm

RESOLVED FIXED in Firefox 42

Status

()

defect
RESOLVED FIXED
4 years ago
3 months ago

People

(Reporter: baku, Assigned: baku)

Tracking

(Blocks 1 bug)

Trunk
mozilla42
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox42 fixed)

Details

Attachments

(1 attachment, 2 obsolete attachments)

Assignee

Description

4 years ago
Posted 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.
Assignee

Comment 2

4 years ago
Posted 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-
Assignee

Comment 4

4 years ago
Posted 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)
Assignee

Updated

4 years ago
Blocks: 1187996
Assignee

Updated

4 years ago
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+
Assignee

Updated

4 years ago
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.
https://hg.mozilla.org/mozilla-central/rev/03bb7cc89e2c
Status: NEW → RESOLVED
Closed: 4 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.