Before this patch, IPCStream was an union containing IPCRemoteSteam or an
InputStreamParamsWithFds. Now InputStreamParamsWithFds is renamed IPCStream and
IPCRemoteSteam is one of the possible InputStreamParams structs.
This patch uses categorical keyed Historgram to collect data. While the key is
used to determine whether is it an external error or an internal error (Note:
the external error is referred to low level failure, for example: database
corrupt, OS API errors, ... etc; the internal error is referred to errors, like:
not handle file properly, unexpected filenames, ... etc), the labels for
categorical indicates where the error happens.
Furthermore, this patch make QuotaManager keep traversing the profile even if
an error happens so that we can get more information in the telemetry data.
Please note that these things should only happen in the Nightly Channel.
Differential Revision: https://phabricator.services.mozilla.com/D15908
--HG--
extra : moz-landing-system : lando
Summary: Really sorry for the size of the patch. It's mostly automatic
s/nsIDocument/Document/ but I had to fix up in a bunch of places manually to
add the right namespacing and such.
Overall it's not a very interesting patch I think.
nsDocument.cpp turns into Document.cpp, nsIDocument.h into Document.h and
nsIDocumentInlines.h into DocumentInlines.h.
I also changed a bunch of nsCOMPtr usage to RefPtr, but not all of it.
While fixing up some of the bits I also removed some unneeded OwnerDoc() null
checks and such, but I didn't do anything riskier than that.
MozPromise most common use is to have an single or exclusive listener. By making the MozPromise generated by IPDL exclusive we can also use move semantics.
While at it, we also use move semantics for the ResponseRejectReason and via the callback's reject method so that the lambda used with the MozPromise::Then can be identical to the one used by the IPDL callback.
As it currently is, it provides no advantage over a copy as it's just an enum; however, this will facilitate future changes where it may not be.
Differential Revision: https://phabricator.services.mozilla.com/D13906
--HG--
extra : moz-landing-system : lando
Datastores are preloaded only for content principals. The preloading is triggered as soon as possible to lower the chance of blocking the main thread in content process. If there is no physical database on disk for given origin, datastore is not created. Preloaded datastores are kept alive for 20 seconds.
In this patch, I went through any place in DOM fetch code, where there are
ReadableStreams and update the locked, disturbed, readable checks.
Because we expose streams more often, we need an extra care in the use of
ErrorResult objects. JS streams can now throw exceptions and we need to handle
them.
This patch also fixes a bug in FileStreamReader::CloseAndRelease() which could
be called in case mReader creation fails.
An issue for missing the "response_padding_size" column in cache.sqlite was
reported in bug 1425146 comment 39. This test reproduces it and is mainly to
ensure that a Cache directory which lacks a directory padding file and contains
an old version of cache.sqlite can still be initialized successfully.
--HG--
extra : rebase_source : 54cca037d815fe9d9af9b34f024aea836be65830
Bug 1290481 introduces the padding mechanism, but there was a corner case which
weren't handled correctly. It created a chance to access cache database before
acutally checking the database version and schema upgrade. If the schema of
cache.sqlite is too old and the padding file disappear, it breaks origins
initialization. This patch ensure the schema is updated to the newest before
accessing it.
--HG--
extra : rebase_source : c2286a2def0c2bdaa6466f562636cf0c8bf4fced
Certain runnables sent from the worker to the content window must be delayed if
the content is paused in the JavaScript debugger. For example, delivering
onmessage events while stopped at a breakpoint would violate the DOM's
run-to-completion rule.
However, other sorts of runnables must be delivered promptly if the worker is
continue to function properly. Thus, the later patches in this bug that
implement the delay for the debugger may, in general, reorder the delivery of
some runnables. So whereas previously runnables sent from the worker to the main
thread could simply assert that the worker was still alive, delayed runnables
will now need to use a WorkerRef to hold the worker alive until they are
processed.
This affects the timing with which weak references to workers decay. Since there
is no solid way to test such GC-sensitive APIs, this patch simply requests a
second GC. This is not guaranteed to pass, but then again, the test as it stands
is not guaranteed to pass either.
Depends on D9217
Differential Revision: https://phabricator.services.mozilla.com/D9218
--HG--
extra : moz-landing-system : lando
This just cleans up the function a bit to make the next change easier to see. No
behavior change intended.
Differential Revision: https://phabricator.services.mozilla.com/D9217
--HG--
extra : moz-landing-system : lando
Streams have multiple parts that can be JS objects from different compartments.
For example, the [[reader]] internal slot of a stream can point to a reader
object in another compartment.
This patch makes the ReadableStream implementation robust against mixing and
matching stream-related objects and methods from different globals.
This also removes ReadableStreamBYOBReader and ReadableStreamBYOBRequest for
now, with a view toward enabling basic ReadableStream features by default in
bug 1389628.
Differential Revision: https://phabricator.services.mozilla.com/D8450
--HG--
extra : rebase_source : 71d73bed5bc82557efcb6b1ecb231275fd3e1189
extra : amend_source : de29f663b9929eb2858b23cc6f4e7ba97b23a28c
extra : source : f91eb962df6a06d5f51ad13caa2a4a9c2947f293
DOM cache IPC code requires a StrongWorkerRef to its worker when invoked
from a WorkerGlobalScope. Under certain condition, e.g. when worker
termination was initiated, it's no longer possible to obtain such a reference,
and said code fails silently by storing a nullptr in the CacheOpArgs object.
This leads to a crash when that object gets serialized.
This is a temporary workaround for this problem, until a more reasonable
solution is implemented.
Differential Revision: https://phabricator.services.mozilla.com/D8200
--HG--
extra : moz-landing-system : lando
Right now, a lot of test code relies on side-effects of SpecialPowers being
loaded into frame script globals. In particular:
- It forces permissive COWs from those scopes, which allows frame scripts to
pass objects from those scopes to unprivileged content that they otherwise
wouldn't.
- It imports a bunch of helper modules and WebIDL globals which would
otherwise not be available.
Fortunately, this seems to only impact test code at this point. But there's a
real down-the-road risk of it impacting shipping code, which ends up working
in automation due to the side-effects of SpecialPowers, but failing in real
world use.
MozReview-Commit-ID: G27eSSOHymX
--HG--
extra : rebase_source : 1702e63fed719fc92def2bdbbb8a7c53572432db
extra : source : 41bedc526dd6ec6b7e8c7be1c832ac60c81d6263
Right now, a lot of test code relies on side-effects of SpecialPowers being
loaded into frame script globals. In particular:
- It forces permissive COWs from those scopes, which allows frame scripts to
pass objects from those scopes to unprivileged content that they otherwise
wouldn't.
- It imports a bunch of helper modules and WebIDL globals which would
otherwise not be available.
Fortunately, this seems to only impact test code at this point. But there's a
real down-the-road risk of it impacting shipping code, which ends up working
in automation due to the side-effects of SpecialPowers, but failing in real
world use.
MozReview-Commit-ID: G27eSSOHymX
--HG--
extra : rebase_source : c528dffe3a54eec75ad6cb358980b783b00eb4a4
When doing TLS session resumption, Firefox currently does not have enough
information to trivially reconstitute the original connection's security
information. Consequently, we have to rebuild the certificate chain in the
handshake callback. Before this patch, we determined the EV and CT status of the
connection but did not set the succeeded cert chain unless the certificate was
EV. This was insufficient. In this patch, we set the succeeded cert chain
regardless of if the certificate is EV or not (provided we found a valid chain).
MozReview-Commit-ID: AuKrlBwX1Qh
--HG--
extra : rebase_source : cafb17548666f6330038012e36fa23ef382f361a
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
This patch was reviewed in parts, however the intermediate states would not build:
Bug 1443954 - Part 3A: Strip pointers from the argument to WriteParam and WriteIPDLParam before selecting the ParamTraits impl, r=froydnj
Bug 1443954 - Part 3B: Move nsIAlertNotification serialization to the refcounted system, r=bz
Bug 1443954 - Part 3C: Move geolocation serialization to the refcounted system, r=bz
Bug 1443954 - Part 3D: Move nsIInputStream serialization to the refcounted system, r=baku
Bug 1443954 - Part 3E: Move BlobImpl serialization to the refcounted system, r=baku
Bug 1443954 - Part 3F: Correctly implement ParamTraits for actors after the ParamTraits changes, r=froydnj