Closed
Bug 1139696
Opened 10 years ago
Closed 10 years ago
Cloned Set is empty if the Set is created in another JSM
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla39
People
(Reporter: MattN, Assigned: billm)
References
Details
Attachments
(3 files)
5.08 KB,
patch
|
Details | Diff | Splinter Review | |
1.42 KB,
patch
|
evilpies
:
review+
|
Details | Diff | Splinter Review |
694 bytes,
patch
|
Details | Diff | Splinter Review |
If I use sendAsyncMessage with a Set created in a different JSM, the Set is empty on the receiving side. Here is the output from the testcase:
> "parent" Set [ 1, /foo/, 3 ] Testcase.jsm:46
Notice how there are 3 items in the set from the JSM in the parent.
> "received in child:" Object { regexp: /foo/, set: Set[3], setFromJSM: Set[0] }
Notice that `set` has 3 items and `setFromJSM` now has 0 despite them being constructed in similar ways but in different JSMs.
> "setFromJSM" "[object Set]"
> "set" "[object Set]"
Both are still Set objects
> "setFromJSM" Array [ ]
> "set" Array [ 1, /foo/, 3 ]
The contents of the set created in Testcase2.jsm are missing.
I would guess this is related to wrappers.
Flags: needinfo?(bobbyholley)
Reporter | ||
Comment 1•10 years ago
|
||
Note that the problem doesn't occur if I change the Set to an Array. It also happens regardless of whether e10s is on or not.
Comment 2•10 years ago
|
||
I don't have the cycles to look at this right now, sorry.
Does the problem reproduce if you just do Cu.cloneInto between JSMs instead of using the message manager? That would imply that the problem lies with our Set/Map cloning in js/src/vm/StructuredClone.cpp.
Tom, do you have a minute to help Matt out?
Flags: needinfo?(bobbyholley) → needinfo?(evilpies)
Assignee | ||
Comment 3•10 years ago
|
||
Attachment #8573596 -
Flags: review?(evilpies)
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → wmccloskey
Attachment #8573596 -
Flags: review?(evilpies) → review+
Assignee | ||
Comment 5•10 years ago
|
||
Comment 6•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/746240a9e4bd
https://hg.mozilla.org/mozilla-central/rev/5ddbdbc00f3c
Status: NEW → RESOLVED
Closed: 10 years ago
status-firefox39:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
You need to log in
before you can comment on or make changes to this bug.
Description
•