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

10 Коммитов

Автор SHA1 Сообщение Дата
Andrea Marchesini 5b2f5ad02d Bug 1513596 - Introduce a Blob.blobImplType attribute, chrome-only, for testing, r=smaug 2018-12-15 21:40:05 +01: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 9a9a71e436 Bug 1469126 - GetAllocationSize should report unique blobs when dealing with nested blobs, r=smaug 2018-06-18 11:35:46 -04:00
Boris Zbarsky 9bdcffc985 Bug 1436902 part 3. Replace usage of NS_IMPL_ISUPPORTS_INHERITED0 with NS_INLINE_DECL_REFCOUNTING_INHERITED when possible. r=mccr8
The change to RootAccessible.cpp fixes an obvious bug introduced in bug 741707.

The visibility changes in gfx/thebes are because NS_DECL_ISUPPORTS has a
trailing "public:" that those classes were relying on to have public
constructors.

MozReview-Commit-ID: IeB8KIJCGhU
2018-02-12 15:44:40 -05:00
Andrea Marchesini 9067ec472c Bug 1404845 - Renaming BlobImpl::GetInternalStream to BlobImpl::CreateInputStream, r=smaug 2017-10-02 13:53:12 +02:00
Jon Coppeard a4fe4cbe3c Bug 1301863 - Tell the JS engine how much memory blob reflectors hold alive r=baku 2017-09-12 10:46:51 +01:00
Andrea Marchesini 1feb18fd09 Bug 1340921 - Introduce PMemoryStream for having PBlob and Multi-e10s happy - part 5 - Make MemoryBlobImpl::DataOwner cloneable, r=mrbkap 2017-03-29 10:40:39 +02:00
Andrea Marchesini f8737e7e7f Bug 1340921 - Introduce PMemoryStream for having PBlob and Multi-e10s happy - part 1 - Expose DataOwnerAdapter, r=mrbkap 2017-03-29 10:40:38 +02:00
Andrea Marchesini 3043646e52 Bug 1339871 - Splitting dom/file/File.{h,cpp}, r=smaug
--HG--
rename : dom/file/File.cpp => dom/file/BaseBlobImpl.cpp
rename : dom/file/File.h => dom/file/BaseBlobImpl.h
rename : dom/file/File.cpp => dom/file/Blob.cpp
rename : dom/file/File.h => dom/file/Blob.h
rename : dom/file/File.cpp => dom/file/BlobImpl.cpp
rename : dom/file/File.h => dom/file/BlobImpl.h
rename : dom/file/File.cpp => dom/file/EmptyBlobImpl.cpp
rename : dom/file/File.h => dom/file/EmptyBlobImpl.h
rename : dom/file/File.cpp => dom/file/FileBlobImpl.cpp
rename : dom/file/File.h => dom/file/FileBlobImpl.h
rename : dom/file/File.cpp => dom/file/MemoryBlobImpl.cpp
rename : dom/file/File.h => dom/file/MemoryBlobImpl.h
rename : dom/file/File.cpp => dom/file/StreamBlobImpl.cpp
rename : dom/file/File.h => dom/file/StreamBlobImpl.h
rename : dom/file/File.h => dom/file/StringBlobImpl.h
rename : dom/file/File.h => dom/file/TemporaryBlobImpl.h
2017-02-16 18:26:38 +01:00