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

18 Коммитов

Автор SHA1 Сообщение Дата
Andrea Marchesini be2551ab2c Bug 1523702 - Max IPC message size for InputStream serialization, r=smaug
The total size of an IPC inputStream message must be less than 1mb. When we
compose the message for the multiplex stream, each sub stream collaborates with
its own size, deciding if it's better to be a pipe stream (IPCRemoteStream) or
a full serialized one.

Differential Revision: https://phabricator.services.mozilla.com/D18543

--HG--
extra : moz-landing-system : lando
2019-02-04 22:50:51 +00:00
Andrea Marchesini 0499bad916 Bug 1520150 - Single InputStreams can serialize themselves as IPCRemoteStreams (pipe) - part 1 - Passing IPC managers around, r=smaug
Before this set of patches, the decision of exposing the stream as a pipe was
centralized in IPCStreamUtils, based on the total expectation size of the IPC
message. This triggers issues when multiplex inputStreams contain something
that cannot be sent as a pipe (IPCBlobInputStream, for instance), or something
that it's better to do not set as a pipe (nsFileInputStream), together with
memory streams (nsStringInputStream), which could make the IPC message greater
then what accepted (1mb).

These patches move the "pipe vs non-pipe" choice into the single inputStream
implementation.
2019-01-28 10:48:35 +01:00
Tooru Fujisawa 7983faeb5d Bug 1511393 - Use c-basic-offset: 2 in Emacs mode line for C/C++ code. r=nbp 2018-12-01 04:52:05 +09: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
Andrea Marchesini 4ebf5b4364 Bug 1496581 - Split nsISeekableStream in 2 classes: nsISeekableStream and nsITellableStream, f=mayhemer, r=froydnj
In the current code there are 3 main issues:

1. nsFileStream is not really thread-safe. There is nothing to protect the
internal members and we see crashes.

2. nsPipeInputStream doesn't implement ::Seek() method and that caused issues
in devtools when a nsHttpChannel sends POST data using a pipe. In order to fix
this, bug 1494176 added a check in nsHttpChannel: if the stream doesn't
implement ::Seek(), let's clone it. This was an hack around nsPipeInputStream,
and it's bad.

3. When nsHttpChannel sends POST data using a file stream, nsFileStream does
I/O on main-thread because of the issue 2. Plus, ::Seek() is called on the
main-thread causing issue 1.

Note that nsPipeInputStream implements only ::Tell(), of the nsISeekableStream
methods. It doesn't implement ::Seek() and it doesn't implement ::SetEOF().

With this patch I want to fix point 2 and point 3 (and consequentially issue 1
- but we need a separate fix for it - follow up). The patch does:

1. it splits nsISeekableStream in 2 interfaces: nsITellableStream and
nsISeekableStream.
2. nsPipeInputStream implements only nsITellableStream.  Doing this, we don't
need the ::Seek() check for point 2 in nsHttpChannel: a simple QI check is
enough.
3. Because we don't call ::Seek() in nsHttpChannel, nsFileStream doesn't do I/O
on the main-thread, and we don't crash doing so.
2018-10-18 13:35:35 +02:00
Andrea Marchesini 6bfb120a59 Bug 1371699 - Correct canceling of the AsyncWait() callback in NonBlockingAsyncInputStream, r=froydnj 2018-01-31 16:45:21 +01:00
Andrea Marchesini 1126b00aed Bug 1405974 - NonBlockingAsyncInputStream must take the ownership of the underlying stream, r=qdot 2018-01-31 16:45:20 +01:00
Andrea Marchesini 890628437c Bug 1371699 - Implement NonBlockingAsyncInputStream - nsIAsyncInputStream wrapper for non-blocking non-async streams, r=froydnj 2018-01-31 16:45:20 +01:00
Sebastian Hengst 07250813a5 Backed out changeset 5ccb0581b72c (bug 1371699) for failing wpt webvtt/parsing/cue-text-parsing/tests/entities.html on Linux. CLOSED TREE
--HG--
extra : amend_source : e773ac9be09b6a87bd906f207f7920ae3b874822
extra : histedit_source : 62306afa6b4d85897d3b0fdd0e056cdcb09087c3
2018-01-31 20:31:35 +02:00
Sebastian Hengst e33e198739 Backed out changeset f1221589e7a6 (bug 1405974) for failing wpt webvtt/parsing/cue-text-parsing/tests/entities.html on Linux
--HG--
extra : histedit_source : d11737083bf4383b50707e024539f45f174531f9
2018-01-31 20:30:45 +02:00
Sebastian Hengst b30ef0fc58 Backed out changeset cf81d20f6713 (bug 1371699) for failing wpt webvtt/parsing/cue-text-parsing/tests/entities.html on Linux
--HG--
extra : histedit_source : cfe4407220971165f82123842f488b9fe48eab66
2018-01-31 20:30:34 +02:00
Andrea Marchesini ffc69d5c96 Bug 1371699 - Correct canceling of the AsyncWait() callback in NonBlockingAsyncInputStream, r=froydnj 2018-01-31 16:45:21 +01:00
Andrea Marchesini 69f4700dfd Bug 1405974 - NonBlockingAsyncInputStream must take the ownership of the underlying stream, r=qdot 2018-01-31 16:45:20 +01:00
Andrea Marchesini 51af3a8898 Bug 1371699 - Implement NonBlockingAsyncInputStream - nsIAsyncInputStream wrapper for non-blocking non-async streams, r=froydnj 2018-01-31 16:45:20 +01:00
Sebastian Hengst b86bd8d413 Backed out changeset 2e253e370b8d (bug 1371699) for frequently assertin in browser-chrome at SourceBuffer.cpp:473. r=backout on a CLOSED TREE 2017-10-05 13:12:36 +02:00
Andrea Marchesini 952e5f8ead Bug 1371699 - Implement NonBlockingAsyncInputStream - nsIAsyncInputStream wrapper for non-blocking non-async streams, r=froydnj 2017-10-03 07:20:17 +02:00
Sebastian Hengst 9d84c676a9 Backed out changeset 919a4eb29621 (bug 1371699) for frequently asserting at image/SourceBuffer.cpp:473, e.g. in browser-chrome's browser_testOpenNewRemoteTabsFromNonRemoteBrowsers.js on OS X and Windows. r=backout 2017-10-03 16:57:29 +02:00
Andrea Marchesini 1297664f63 Bug 1371699 - Implement NonBlockingAsyncInputStream - nsIAsyncInputStream wrapper for non-blocking non-async streams, r=froydnj 2017-10-03 07:20:17 +02:00