This reverts commit 42a598162b.
Revert "Bug 1465074 - Let ServiceWorker intercepts range requests. r=hsingh"
This reverts commit b2485fbc6a.
Revert "Bug 1465074 - Return NetworkError while get a ranged response but not requested by a ranged request. r=hsingh"
This reverts commit a42d6a8138.
Revert "Bug 1465074 - Only remove privileged nocors request headers if RequestInit memebers presented in Request::Constructor. r=hsingh"
This reverts commit 06d9679bcb.
This reverts commit 4cb63eb70c.
Revert "Bug 1465074 - Let ServiceWorker intercepts range requests. r=hsingh"
This reverts commit 0fa2e5d3c8.
Revert "Bug 1465074 - Return NetworkError while get a ranged response but not requested by a ranged request. r=hsingh"
This reverts commit 49cabcd364.
Revert "Bug 1465074 - Only remove privileged nocors request headers if RequestInit memebers presented in Request::Constructor. r=hsingh"
This reverts commit a6087fb37b.
This patch updates InternalRequest and InternalResponse such that it parses the
URL passed to it at creation time, rather than when the channel is created.
This should improve the behaviour of these types around Blob URLs, so that
extra state, such as the "revoked" flag, is calculated at the correct time
as-per spec.
While making this change, I noticed that a previous Cache DB migration could
insert an "" URL in the DB when migrating from a single response URL to a URL
list, rather than storing an empty URL list. The choice was made to do
filtering when reading, rather than performing a migration, to avoid migration
first-time start-up overhead.
Differential Revision: https://phabricator.services.mozilla.com/D276047
Normally, a fetch request acquires its cookieJarSettings from the global
that triggers it (a window or a worker). However, the global may not
always have the correct cookieJarSettings. For example, the Reporting API
delivers reports using fetch from a global whose cookieJarSettings does
not match the originating content. In this case, the fallback creates a
default cookieJarSettings which can cause crashes when processing
Set-Cookie response headers (e.g. CHIPS cookies with the Partitioned
attribute).
This patch adds a ChromeOnly cookieJarSettings field to RequestInit and
a corresponding member on InternalRequest, allowing callers to explicitly
provide the correct cookieJarSettings. When set, it takes precedence
over the cookieJarSettings obtained from the global.
Differential Revision: https://phabricator.services.mozilla.com/D285021
It is replaced by a standard-conforming cast to (void) which is
understood the same by the compiler.
In some cases this could be replaced by `[[maybe_unused]]` but for
expression whose value is ignored, this requires storing to a temporary
variable first, so not going that way.
One notable change is that marking an object of type already_AddRefed as
unused used to implicitly leak memory. This is now made explicit.
Most of the heavy lifting was done through:
$ git grep -l '\<Unused\> <<' | xargs sed -i -e 's/Unused << /(void)/g'
$ git grep -l mozilla/Unused.h | xargs sed -i -e '/mozilla\/Unused.h/ d'
Differential Revision: https://phabricator.services.mozilla.com/D268706
It is replaced by a standard-conforming cast to (void) which is
understood the same by the compiler.
In some cases this could be replaced by `[[maybe_unused]]` but for
expression whose value is ignored, this requires storing to a temporary
variable first, so not going that way.
One notable change is that marking an object of type already_AddRefed as
unused used to implicitly leak memory. This is now made explicit.
Most of the heavy lifting was done through:
$ git grep -l '\<Unused\> <<' | xargs sed -i -e 's/Unused << /(void)/g'
$ git grep -l mozilla/Unused.h | xargs sed -i -e '/mozilla\/Unused.h/ d'
Differential Revision: https://phabricator.services.mozilla.com/D268706
It is replaced by a standard-conforming cast to (void) which is
understood the same by the compiler.
In some cases this could be replaced by `[[maybe_unused]]` but for
expression whose value is ignored, this requires storing to a temporary
variable first, so not going that way.
One notable change is that marking an object of type already_AddRefed as
unused used to implicitly leak memory. This is now made explicit.
Most of the heavy lifting was done through:
$ git grep -l '\<Unused\> <<' | xargs sed -i -e 's/Unused << /(void)/g'
$ git grep -l mozilla/Unused.h | xargs sed -i -e '/mozilla\/Unused.h/ d'
Differential Revision: https://phabricator.services.mozilla.com/D268706
It is replaced by a standard-conforming cast to (void) which is
understood the same by the compiler.
In some cases this could be replaced by `[[maybe_unused]]` but for
expression whose value is ignored, this requires storing to a temporary
variable first, so not going that way.
One notable change is that marking an object of type already_AddRefed as
unused used to implicitly leak memory. This is now made explicit.
Most of the heavy lifting was done through:
$ git grep -l '\<Unused\> <<' | xargs sed -i -e 's/Unused << /(void)/g'
$ git grep -l mozilla/Unused.h | xargs sed -i -e '/mozilla\/Unused.h/ d'
Differential Revision: https://phabricator.services.mozilla.com/D268706
Most changes are automated. Relevant bit is dom/.clang-format. I had to
manually disable clang-format in a few places where importing external
files and so on that aren't self-contained, and fix a couple includes /
forward declarations.
Differential Revision: https://phabricator.services.mozilla.com/D256800
This allows code with Chrome priviledges to use the fetch API
to specify a triggering principal instead of needing to use
XMLHttpRequest.
The triggeringPrincipal is only used when the fetch principal
is already the systemPrincipal.
Differential Revision: https://phabricator.services.mozilla.com/D213418
The dispatch to the main thread, and specialized worker-thread parsing
should no longer be necessary now that nsIURI and nsIPrincipal are
properly threadsafe.
This patch also collapses the main-thread and off-main-thread logic
together for URI parsing, removing some repetition.
Differential Revision: https://phabricator.services.mozilla.com/D215224
Remove mWorkerPrivate from WorkerMainThreadRunnable. Instead, using a ThreadSafeWorkerRef to keep Worker alive until the created syncLoop is destroyed.
In general, WorkerMainThreadRunnable::mWorkerPrivate is only used for dispatching the MainThreadStopSyncLoopRunnable back to the Worker thread. Because of the syncLoop, the Worker is supposed to be kept alive until the created syncLoop is destroyed.
RefPtr<ThreadSafeWorkerRef> WorkerMainThreadRunnable::mWorkerRef is introduced to ensure a valid WorkerPrivate during WorkerMainThreadRunnable's execution.
WorkerMainThreadRunnable::mWorkerRef is allocated just before creating a syncLoop in WorkerMainThreadRunnable::Dispatch. And released after the created syncLoop::Run() finishes.
Depends on D212556
Differential Revision: https://phabricator.services.mozilla.com/D212557
Sorry for the massive patch but I found it hard to split without
introducing a bunch of copies around...
This mostly makes necko and DOM agree on which strings to use, which
should result on less copies and conversions.
Differential Revision: https://phabricator.services.mozilla.com/D205601