Andrea Marchesini
d31d18594e
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
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
Andrea Marchesini
6051780991
Bug 1434553 - Implement nsIInputStreamLength and nsIAsyncInputStreamLength - part 4 - SlicedInputStream exposes nsIInputStreamLength, r=froydnj
2018-05-23 07:12:35 +02:00
Andrea Marchesini
2a2030b1ab
Bug 1453955 - Synchronize access to various stream classes' async wait callback reference - SlicedInputStream, r=mayhemer
2018-04-13 16:40:20 +02:00
Andrea Marchesini
3089afde86
Bug 1451731 - Synchronize access to various stream classes' async wait callback reference - part 3 - SlicedInputStream, r=mayhemer
2018-04-10 17:33:08 +02:00
Andrea Marchesini
26516bfdd9
Bug 1414767 - Moving SlicedInputStream under mozilla namespace, r=froydnj
2017-11-07 01:04:06 +01:00
Sebastian Hengst
2758ec8213
Backed out changeset 66d49b9e8217 (bug 1414767) for build bustage on OS X: CoreServices.framework/Frameworks/AE.framework/Headers/AERegistry.h:693: reference to 'TextRange' is ambiguous. r=backout on a CLOSED TREE
2017-11-06 17:51:56 +01:00
Andrea Marchesini
62fc8892e1
Bug 1414767 - Moving SlicedInputStream under mozilla namespace, r=froydnj
2017-11-06 16:21:01 +01:00
Andrea Marchesini
be21148d8f
Bug 1414068 - SlicedInputStream should be marked as closed when the underyling stream returns NS_BASE_STREAM_CLOSED, r=smaug
2017-11-06 14:22:47 +01:00
Andrew McCreight
f3a79a756e
Bug 1412119 - Re-fix mode lines in xpcom. r=erahm
2017-10-26 14:39:00 -04:00
Andrea Marchesini
b54a1d90a9
Bug 1403771 - SlicedInputStream takes ownership of the underlying stream and it propagates the Close() call, r=smaug
2017-10-05 07:38:48 +02:00
Sebastian Hengst
87dc4f2181
Backed out changeset c68498143c13 (bug 1403771) for bustage at dom/file/StreamBlobImpl.cpp:108: 'GetInternalStream' was not declared in this scope. r=backout on a CLOSED TREE
2017-10-04 19:11:13 +02:00
Andrea Marchesini
d86c6d6c6a
Bug 1403771 - SlicedInputStream takes ownership of the underlying stream and it propagates the Close() call, r=smaug
2017-10-04 18:51:10 +02:00
Andrea Marchesini
eb2a8564d0
Bug 1403771 - SlicedInputStream::Read should not call ::Read() of the underlying stream when there is nothing else to read, r=smaug
2017-10-04 13:10:10 +02:00
Andrea Marchesini
07b259abe7
Bug 1361654 - Initializing all the member variables in SlicedInputStream, r=qdot
2017-05-04 08:36:35 +02:00
Phil Ringnalda
68ba3c8477
Backed out 2 changesets (bug 1360992, bug 1361654) for a 70% failure rate in test_fileReader.html on ASan e10s
...
Backed out changeset ab9fdee3a6a4 (bug 1360992)
Backed out changeset 141c2dfd49ff (bug 1361654)
MozReview-Commit-ID: 3rSzvmc5FPx
2017-05-05 12:35:57 -07:00
Andrea Marchesini
4e1e564570
Bug 1361654 - Initializing all the member variables in SlicedInputStream, r=qdot
2017-05-04 08:36:35 +02:00
Andrea Marchesini
27a8f8bdb4
Bug 1355369 - SlicedInputStream must implement AsyncWait correctly, r=smaug
2017-04-12 13:49:08 +02:00
Andrea Marchesini
69223f7b26
Bug 1355369 - SlicedInputStream should expose nsIAsyncInputStream interface only when needed, r=smaug
2017-04-12 13:49:08 +02:00
Andrea Marchesini
cf50407739
Bug 1350239 - SlicedInputStream::Seek must set correct position in the source stream, r=smaug
2017-03-27 11:48:06 +02:00
Andrea Marchesini
8dcd278c86
Bug 1347557 - Move 2 static methods about the IPC serialization of streams into an helper class, r=qdot
2017-03-21 07:47:25 +01:00
Andrea Marchesini
2e34ed89e2
Bug 1339710 - Remove the implementation of SlicedInputStream::ReadSegments, r=smaug
2017-02-22 09:42:27 +01:00
Andrea Marchesini
6305941d12
Bug 1339710 - SlicedInputStream should be nsISeekableStream, r=smaug
2017-02-22 09:41:59 +01:00
Andrea Marchesini
9e63830670
Bug 1339710 - SlicedInputStream should be an nsIIPCSerializableInputStream, r=smaug
2017-02-22 09:41:05 +01:00
Andrea Marchesini
919ec678d4
Bug 1339710 - SlicedInputStream should not be nsICloneableInputStream if the source stream is not, r=smaug
2017-02-22 09:40:46 +01:00
Iris Hsiao
0230dfa2c7
Backed out 5 changesets (bug 1339710) for GTest failures in TestSlicedInputStream.StartBiggerThan
...
Backed out changeset 7c0ec55b44dc (bug 1339710 )
Backed out changeset cbb4e1c2aada (bug 1339710 )
Backed out changeset c685dca493f5 (bug 1339710 )
Backed out changeset 4761a15d45fd (bug 1339710 )
Backed out changeset 7561692c1bc7 (bug 1339710 )
2017-02-22 16:19:50 +08:00
Andrea Marchesini
671ef871ca
Bug 1339710 - Remove the implementation of SlicedInputStream::ReadSegmenets, r=smaug
2017-02-22 07:57:54 +01:00
Andrea Marchesini
4162b26d95
Bug 1339710 - SlicedInputStream should be nsISeekableStream, r=smaug
2017-02-22 07:57:14 +01:00
Andrea Marchesini
d56f4170ce
Bug 1339710 - SlicedInputStream should be an nsIIPCSerializableInputStream, r=smaug
2017-02-22 07:55:50 +01:00
Andrea Marchesini
e137e36420
Bug 1339710 - SlicedInputStream should not be nsICloneableInputStream if the source stream is not, r=smaug
2017-02-22 07:54:46 +01:00
Andrea Marchesini
309ab1a58d
Bug 1288997 - memory blob should not be shared across processes - part 2 - SlicedInputStream, r=froydnj
2016-07-25 22:41:02 +02:00