Open
Bug 1462676
Opened 7 years ago
Updated 3 years ago
StructuredCloneData move constructor is a bit suspect
Categories
(Core :: DOM: Content Processes, enhancement, P2)
Core
DOM: Content Processes
Tracking
()
NEW
People
(Reporter: bkelly, Unassigned)
Details
(Whiteboard: DWS_NEXT)
The StructuredCloneData move constructor/assignment currently looks like this:
mExternalData = Move(aOther.mExternalData);
mSharedData = Move(aOther.mSharedData);
mIPCStreams = Move(aOther.mIPCStreams);
mInitialized = aOther.mInitialized;
This is all well and good I suppose, but it is at least missing some data from the base class.
For example, it does not move over mPortIdentifiers at all. This means if you move a StructuredCloneData for a message that contains a transferred MessagePort then you will hit this debug assertion:
https://searchfox.org/mozilla-central/rev/d4b9e50875ad7e5d20f2fee6a53418315f6dfcc0/dom/base/StructuredCloneHolder.cpp#1155
Also, I recently removed the base StructuredCloneHolder move constructor because it was broken. It did not update the bare closure pointer it passed to the JS APIs.
I tried removing the StructuredCloneData move constructor/assignment but it broke the build. It seems we are using this type in an nsTArray that wants to use move semantics somewhere.
Andrew, Andrea, what do you think the right thing to do here is?
Flags: needinfo?(bugmail)
Flags: needinfo?(amarchesini)
Updated•7 years ago
|
Priority: -- → P2
Updated•7 years ago
|
Whiteboard: DWS_NEXT
Comment 1•7 years ago
|
||
adding to DWS_NEXT, removing need-info
Flags: needinfo?(bugmail)
Flags: needinfo?(amarchesini)
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•