gecko-dev/netwerk
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
..
base Bug 1496581 - Split nsISeekableStream in 2 classes: nsISeekableStream and nsITellableStream, f=mayhemer, r=froydnj 2018-10-18 13:35:35 +02:00
build Bug 1498586 - Add clang-format off to avoid the reformatting of the data structures r=Ehsan 2018-10-12 20:48:24 +00:00
cache Bug 1498586 - Add clang-format off to avoid the reformatting of the data structures r=Ehsan 2018-10-12 20:48:24 +00:00
cache2 Bug 1496581 - Split nsISeekableStream in 2 classes: nsISeekableStream and nsITellableStream, f=mayhemer, r=froydnj 2018-10-18 13:35:35 +02:00
cookie Bug 1440462 - Send httponly cookie names to content processes. r=jdm 2018-09-26 15:39:33 +00:00
dns Backed out changeset a4b43a47589a (bug 1498782) for causing multimple failures e.g.: ts_paint_webext CLOSED TREE 2018-10-17 12:19:00 +03:00
ipc Bug 1487100 - Allow calling nsICacheInfoChannel.preferAlternativeDataType(altDataType, contentType) multiple times r=michal,luke 2018-10-17 13:58:30 +00:00
locales Bug 1260399 - Remove deprecated messages in nsICookieManager methods - part 4 - remove the deprecated message, r=ehsan 2018-09-24 11:37:57 +02:00
mime Bug 1488266 - Use const nsACString& in the argument to ToUTF8() in nsMIMEHeaderParamImpl.cpp; r=hsivonen 2018-09-04 09:54:57 -04:00
protocol Bug 1496581 - Split nsISeekableStream in 2 classes: nsISeekableStream and nsITellableStream, f=mayhemer, r=froydnj 2018-10-18 13:35:35 +02:00
sctp Bug 1051685: increase SCTP window size from 128K to 1M. r=lgrahl 2018-10-16 21:12:34 +00:00
socket Bug 1473736 - Implement necko part of ESNI r=mak,kmag,mcmanus 2018-09-22 23:54:11 +03:00
srtp Bug 1479665: update libsrtp to bb0412ee84ebe3d2916b45b19de72fabb183d9db. r=bwc 2018-09-13 14:39:31 +00:00
streamconv Bug 1494127 - Fix trivial calls to do_QueryInterface that return an nsresult r=smaug 2018-10-01 21:38:43 +00:00
system
test bug 1498525 - make test_captive_portal_service use localhost only r=valentin 2018-10-18 07:06:43 +00:00
wifi Bug 1090497 - Re-enable warnings as errors on clang-cl. r=froydnj 2018-07-31 22:10:07 +09:00
moz.build
necko-config.h.in