Same as base URL, the mReferrerPolicy reflects the server response, and it
need to be retained for the cached case.
The existing consumers use the ScriptFetchInfo field.
Differential Revision: https://phabricator.services.mozilla.com/D294343
The subsequent patches will remove the fields from LoadedScript, and then
use the ScriptLoadRequest::mFetchInfo instead.
The LoadedScript variant of ScriptHashKey is no longer necessary.
Differential Revision: https://phabricator.services.mozilla.com/D294340
This reverts commit 6990290e13.
Revert "Bug 2024970 - Enable stencil navigation code on all branches, behind the pref. r=nbp,extension-reviewers,devtools-reviewers,whimboo,robwu,nchevobbe"
This reverts commit d2dd54d562.
ToStringForLookup stringifies a subset of ScriptHashKey fields, which cannot be
directly extracted from the channel on the DevTools side.
Differential Revision: https://phabricator.services.mozilla.com/D283559
Given SRIMetadata is partially ordered, using it in a key makes the logic complex and too strict.
Move the SRIMetadata validation after the lookup.
Differential Revision: https://phabricator.services.mozilla.com/D283542
This reverts commit c6b62c4029.
Revert "Bug 1997870 - Part 3: Split EncodeBytecodeAndSave into two steps. r=bthrall"
This reverts commit f6fed9057d.
Revert "Bug 1997870 - Part 2: Make BytecodeMimeTypeFor methods take const. r=bthrall"
This reverts commit 751adfcc4b.
Revert "Bug 1997870 - Part 1: Remove obsolete comment. r=bthrall"
This reverts commit cc15fbf365.
This is a preparation for the later patches.
ScriptFetchOptions and URI fields are duplicated between ScriptLoadRequest and
LoadedScript, and this patch stack is going to remove them from
ScriptLoadRequest.
At the point of ScriptLoader::TryUseCache, LoadedScript is not yet created,
and ScriptHashKey needs to receive ScriptFetchOptions and URI in addition to
ScriptLoadRequest.
In order to avoid misuse, ScriptHashKey constructor is split into two variants.
One receives ScriptLoadRequest+ScriptFetchOptions+nsIURI, which is for
the case LoadedScript is not yet created,
and the other receives ScriptLoadRequest+LoadedScript, which is for the case
LoadedScript is already created.
Differential Revision: https://phabricator.services.mozilla.com/D267349
This is a preparation for the later patches.
ScriptFetchOptions and URI fields are duplicated between ScriptLoadRequest and
LoadedScript, and this patch stack is going to remove them from
ScriptLoadRequest.
At the point of ScriptLoader::TryUseCache, LoadedScript is not yet created,
and ScriptHashKey needs to receive ScriptFetchOptions and URI in addition to
ScriptLoadRequest.
In order to avoid misuse, ScriptHashKey constructor is split into two variants.
One receives ScriptLoadRequest+ScriptFetchOptions+nsIURI, which is for
the case LoadedScript is not yet created,
and the other receives ScriptLoadRequest+LoadedScript, which is for the case
LoadedScript is already created.
Differential Revision: https://phabricator.services.mozilla.com/D267349
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