Граф коммитов

24 Коммитов

Автор SHA1 Сообщение Дата
Jeff Gilbert 112e44b69e No bug - clang-format -p mfbt 2019-03-29 23:42:40 -07:00
dOn'tReallycAre 2823fecb3a Bug 1353767 - BufferList methods that can OOM should all be MOZ_MUST_USE. r=billm
The Pickle methods can use MOZ_ALWAYS_TRUE because the BufferList is
infallible, so the WriteBytes calls will never fail.
2019-03-26 13:24:00 +02:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Brian Hackett 3f2c401055 Bug 1465287 Part 9 - Allow copying IPDL messages, r=froydnj.
--HG--
extra : rebase_source : 25d5c75b5a5b07b545646535bd8da7b9fd9562dc
2018-07-22 11:53:23 +00:00
Brian Hackett f6b8e6f81c Bug 1309552 - Specify buffer size when freeing data in AllocPolicy, r=waldo.
--HG--
extra : rebase_source : f4e2d9f8831cf41c19d592ce252e87161f32250b
2018-07-20 23:58:34 +00:00
Emilio Cobos Álvarez fffb25b74f 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
Alex Gaynor 3511d14f46 Bug 1462912 - fixed BufferList::Extract to handle the case where the call consumes the entirety of the BufferList; r=froydnj
MozReview-Commit-ID: 1LWODn8JaNL

--HG--
extra : rebase_source : 29cea444a49eb5e2ade33214ff52d6419949337e
2018-05-22 13:04:59 -04:00
Alex Gaynor a13531321e Bug 1456189 - Simplify BufferList::Extract to make the lifetimes clearer. r=froydnj 2018-05-18 18:59:00 -04:00
Gurzau Raul 841689c6d7 Backed out changeset 1d0aa0c581cf (bug 1456189) for bustage on selftest.py on a CLOSED TREE 2018-05-18 01:00:26 +03:00
Alex Gaynor bb3ec615d6 Bug 1456189 - Simplify BufferList::Extract to make the lifetimes clearer. r=froydnj 2018-05-17 17:16:43 -04:00
Alex Gaynor 3e8fd2dc07 Bug 1450232 - in IPC, check that lengths fit in the available data before allocating data; r=mccr8
There are three things we want to be true:

a) If the child sends a large value and the parent can't allocate enough space
   for it we use an infallible allocation so the parent dies with an OOM.
b) If a fuzzer generates (huge-length, small-data) we don't try to allocate
   huge-length bytes; knowing that the read will fail.
c) No fuzzer-specific branches in the core IPC serialization code.

Finally, this makes (huge-length, small-data) consistent with other cases where
the data is potentially truncated: ReadParam returns false.

MozReview-Commit-ID: 6nDKrw5z4pt

--HG--
extra : rebase_source : 58372d29139e9545a6ed2852c7243affeab6fdb7
2018-04-19 16:53:29 -04:00
Jeff Muizelaar 07d53bd660 Bug 1379680. Add a way to append buffers to a BufferList. r=billm 2017-11-29 10:11:13 -05:00
Kris Maglione 8683b183cd Bug 1382645: Part 1 - Add memory reporter for StructuredCloneHolder binding implementation. r=billm
MozReview-Commit-ID: aK3ljfCJVi

--HG--
extra : rebase_source : d788c6c686cc72b423ca100795a379d343c398db
2017-07-25 14:53:41 -07:00
Kris Maglione fc7a069802 Bug 1373579: Part 3 - Require fallible Init method rather than infallible constructor when using fallible allocator. r=billm
MozReview-Commit-ID: 7ymS0e39mrJ

--HG--
extra : rebase_source : 1f191e5107431575d96d3dd66e5e4fda960917bd
2017-06-20 12:06:13 -07:00
Kris Maglione 33c22b03e7 Bug 1373579: Part 2 - Deserialize StructuredCloneBlob in segments rather than a single large allocation. r=billm
MozReview-Commit-ID: QZqPKSTheG

--HG--
extra : rebase_source : 6f1618a4542e34db92bafde3b4577197672eaf3f
2017-06-19 16:51:34 -07:00
Thinker K.F. Li 48e9a43dc4 Bug 1331173 - Increase header segment capacity for TaskTracer. r=billm
--HG--
extra : rebase_source : 3cc829ac53c520896d3f28ddf4a8e27a6eac6fc1
2017-03-10 02:35:00 +01:00
Steve Fink 7700214282 Bug 1264053 - Transfer DifferentProcess ArrayBuffers by copying, r=jorendorff
--HG--
extra : rebase_source : aed39bb2f92888af7626fd4c37df366cb1761bb8
extra : histedit_source : 4e231e7ef1b0b21d0c4bff2ebaa611e8b321e6d4
2017-01-19 14:02:40 -08:00
Kan-Ru Chen 3e934c8f5c Bug 1305791 - Clear result.mSegments if MoveFallible failed. r=billm
MozReview-Commit-ID: 8UaGt1OEfhh

--HG--
extra : rebase_source : c084812d2e4d8633d049638dcd55b0b97db2c603
2016-09-30 17:37:44 +08:00
Kan-Ru Chen 99748028a6 Bug 1051567 - Make sure we resend file descriptors for the first chunk of a message. r=billm
Check if the buffers iterator was never consumed. This is a regression
introduced when converting ipc to use BufferList in bug 1262671.

MozReview-Commit-ID: LWAoVlI5CKJ

--HG--
extra : rebase_source : c4f16f4f90f56153c10cf1d9113c4c55748595f0
2016-08-30 18:26:59 +08:00
Kan-Ru Chen c49f09db99 Bug 1297981 - Delete BufferList::FlattenBytes and Pickle::FlattenBytes. r=billm
MozReview-Commit-ID: G3a4DN4Lovi

--HG--
extra : rebase_source : 17818efb7578117b708636d06e6a2f5d14532c94
2016-08-25 17:15:38 +08:00
Kan-Ru Chen 506dfe6ea3 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
Kan-Ru Chen 3dcef6a932 Bug 1264642 - Part 3. Add BufferList::MoveFallible. r=billm
It works like a move constructor but it's fallible. It can also move
data to different but compatible AllocPolicy.

MozReview-Commit-ID: LAbPWCwnrr6
2016-08-23 00:40:46 +08:00
Kan-Ru Chen 6f3e6b1234 Bug 1264642 - Part 2. Add BufferList::Extract and Pickle::ExtractBuffers. r=billm
These methods allow us to move some buffers out of a pickle with minimum
copying. It's useful when the IPC deserialized type uses BufferList to
store data and we want to take the buffers from IPC directly.

Borrowing is not suitable to use for IPC to hand out data because we
often want to store the data somewhere for processing after IPC has
released the underlying buffers.

MozReview-Commit-ID: F1K2ZMkACqq
2016-08-23 00:40:45 +08:00
Bill McCloskey 308608ab39 Bug 1262671 - Introduce MFBT BufferList class (r=froydnj) 2016-05-27 09:57:40 -07:00