Commit Graph

24 Commits

Author SHA1 Message Date
Kris Maglione
7c32528e91 Bug 1470365: Part 1 - Add a compact, read-only, shared-memory string map class. r=erahm
This class implements a shared memory key-value store that fits into a single
memory mapped segment. All of the runtime data for its instances are stored in
the shared memory region, which means that memory overhead for each instance
in each process is only a few bytes.

Importantly, the key and value strings returned by this class are also
pointers into the shared memory region, which means that once an instance is
created, its memory cannot be unmapped until process shutdown.

For the uses I intend to put it to, this is a reasonable constraint. If we
need to use it for shorter-lived maps in the future, we can add an option to
return non-literal dependent strings that will be copied if they need to be
kept alive long term.

MozReview-Commit-ID: 5BwAaDsb7HS
2018-06-29 22:50:41 -07:00
Ben Kelly
b5f09302e8 Bug 1462466 P3 Fix StructuredCloneData::CopyFromCloneMessageDataForBackgroundParent() to use CopyMemory instead of BorrowMemory. r=baku 2018-06-25 07:03:18 -07:00
Ben Kelly
dea538c815 Bug 1462466 P1 Add a ServiceWorkerCloneData type with threadsafe ref-counting. r=baku 2018-06-25 07:03:18 -07:00
Emilio Cobos Álvarez
4b8b5e1717 Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Steve Fink
a79b7990da Bug 1442722 - Move scope into JSStructuredData, r=baku,jorendorff 2018-04-03 11:17:33 -07:00
Steve Fink
adc787d237 Bug 1455071 - Use delegation rather than inheritance for the BufferList in JSStructuredCloneData, r=jorendorff,r=baku 2018-03-15 16:56:09 -07:00
Boris Zbarsky
e7b3aff703 Bug 1452010 part 3. Remove nsIDOMDOMException. r=qdot
MozReview-Commit-ID: AFKzyxCyriJ
2018-04-06 23:29:13 -04:00
Andrea Marchesini
bb51c49f4f Bug 1353629 - PBlob refactoring - part 3 - IPCBlob in ClonedMessageData, r=smaug
This is the first use of IPCBlob: ClonedMessageData.
ClonedMessageData is used for BroadcastChannel, MessagePort and any
postMessage() communication. This patch changes StructuredCloneData in order to
use IPCBlob instead of PBlob.
BroadcastChannel has a custom way to manage Blobs because when the parent
receives them from a content process, it must send them to any other
BroadcastChild actor duplicating the serialization.
2017-04-24 12:09:40 +02:00
Andrea Marchesini
6e9e4bc94e Bug 1350386 - Make nsInputStream structuredCloneable, r=mystor 2017-04-05 19:02:57 +02:00
Andrew Sutherland
f799e93175 Bug 1315913 - Part 1: Move nsFrameMessenger structured clone Build/Unpack into StructuredCloneData and expand to support PBackground. r=baku 2016-11-21 04:06:41 -05:00
Andrea Marchesini
5c5b24129f Bug 1312817 - support {window,worker}.postMessage() of WebAssembly.Module, r=qdot, r=luke 2016-10-28 14:44:04 +02:00
Carsten "Tomcat" Book
621d8d7cf1 Backed out changeset 19e79becc540 (bug 1312817) for failures in own test on android 2016-10-28 12:14:30 +02:00
Andrea Marchesini
03ed395de9 Bug 1312817 - support {window,worker}.postMessage() of WebAssembly.Module, r=qdot, r=luke 2016-10-27 20:50:23 +02:00
Lars T Hansen
30645f2bc5 Bug 1302036 - DOM changes to conform to new JS engine API for cloning. r=baku 2016-10-24 15:14:45 +02:00
Kan-Ru Chen
e8b75a6839 Bug 1264642 - Part 4. Use BufferList to replace raw buffers in StructuredClone. r=baku r=billm r=jorendorff
In JS StructuredClone BufferList<SystemAllocPolicy> is typedef'd to
JSStructuredCloneData and use everywhere in gecko that stores structured
clone data.

This patch changed some raw pointers to UniquePtr<JSStructuredCloneData>
and some to stack allocated JSStructuredCloneData for better life time
management. Some parameters or methods are deleted because of changing
to the new data structure.

MessagePortMessage now has the exactly same structure with
ClonedMessageData. Maybe in the future they can be consolidated.

MozReview-Commit-ID: 1IY9p5eKLgv
2016-08-23 00:40:46 +08:00
Bill McCloskey
0f010ae122 Bug 1262671 - IPC ReadData/ReadBytes elimination (r=froydnj) 2016-05-27 09:57:39 -07:00
Bill McCloskey
85799ac803 Bug 1262671 - void** -> PickleIterator (r=froydnj) 2016-05-27 09:57:38 -07:00
Mantaroh Yoshinaga
68f9e916dd Bug 1174624 - Add PortIdentifier copy code in order to communicate with same process. r=baku 2016-02-15 19:43:00 +01:00
Mantaroh Yoshinaga
dd7c670d79 Bug 1174624 - Add the Transferable parameter into SendAsyncMessage of nsFrameMessageManager. r=baku 2016-01-31 22:48:00 +01:00
Morris Tseng
b500813d84 Bug 1215438 - Part 2: Add transfer support for ImageBitmap. r=baku 2015-12-18 14:52:16 +08:00
Kit Cambridge
4e1d9d79be Bug 1212129 - e10s support for disabling site notifications. r=wchen 2015-10-22 15:10:14 -06:00
Olli Pettay
9ebbaed626 Bug 1213437 - Less data copying when handling structured clones in MessageManager, r=baku 2015-10-10 23:32:20 +03:00
Andrea Marchesini
d3afd48953 Bug 1209919 - Improving naming and comments in StructuredCloneHelper, r=smaug 2015-09-30 13:22:08 +01:00
Andrea Marchesini
8cbd09f629 Bug 1203426 - Rename StructuredCloneIPCHelper to StructuredCloneData, r=smaug 2015-09-10 21:50:58 +01:00