This reverts commit 524a1fc191.
Revert "Bug 2020707 - Part 5: Gate speculation rules script support behind a pref. r=dom-core-reviewers,jjaschke"
This reverts commit 11741d18ad.
Revert "Bug 2020707 - Part 4: Unregister speculation rules when their script element is removed. r=dom-core-reviewers,hsivonen"
This reverts commit 5202943dc9.
Revert "Bug 2020707 - Part 3: Report an exception if speculation rules parsing fails. r=dom-core-reviewers,jjaschke"
This reverts commit 70c5aa5425.
Revert "Bug 2020707 - Part 2: Add support for speculationrules script type. r=dom-core-reviewers,jjaschke"
This reverts commit 65b30a350b.
Revert "Bug 2020707 - Part 1: Allow speculation rules to be registered to the document from scripts. r=hsivonen,jjaschke"
This reverts commit 28c7050de9.
Revert "Bug 2020704 - Part 2: Add parser for speculation rule sets. r=hsivonen,jjaschke"
This reverts commit eabb8c6eb3.
Revert "Bug 2020704 - Part 1: Add speculation rules crate. r=dom-core-reviewers,jjaschke"
This reverts commit cd65bed005.
Even after the SharedScriptCache is cleared on memory pressure,
there can be other references to the LoadedScript, such as the imported modules.
The stencil references are no longer necessary, and the pointers should be cleared.
Differential Revision: https://phabricator.services.mozilla.com/D294602
On memory pressure, the stencil held only for the cache should be released.
In that situation, the LoadedScript instances can still be held by
ScriptLoadRequest etc, and thus the LoadedScript instance itself should be kept
alive, while the stencil pointer being released.
Differential Revision: https://phabricator.services.mozilla.com/D294601
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 260ad06a2e.
Revert "Bug 2031200 - Part 11: Repurpose LoadedScript::mReferrerPolicy for the cached case. r=bthrall"
This reverts commit cedffcba4e.
Revert "Bug 2031200 - Part 10: Repurpose LoadedScript::mBaseURL for the cached case. r=bthrall"
This reverts commit a4fd83ce4d.
Revert "Bug 2031200 - Part 9: Add ScriptLoadRequest::FetchOptions() accessor and remove LoadedScript::mFetchOptions. r=bthrall"
This reverts commit 66bc9492b3.
Revert "Bug 2031200 - Part 8: Remove ScriptHashKey constructor with LoadedScript. r=bthrall"
This reverts commit 5bb4928c8f.
Revert "Bug 2031200 - Part 7: Use ScriptFetchInfo for the script private and module private instead of LoadedScript. r=bthrall,allstarschh,dom-worker-reviewers,asuth"
This reverts commit 0011dfbdcc.
Revert "Bug 2031200 - Part 6: Do not pass private value to JS::UpdateDebugMetadata. r=bthrall"
This reverts commit 0e8a2f1032.
Revert "Bug 2031200 - Part 5: Sync ModuleScript::mForPreload and ScriptFetchInfo::mIsForModulePreload. r=bthrall"
This reverts commit 0f69b1fb94.
Revert "Bug 2031200 - Part 4: Sync LoadedScript::mBaseURL and ScriptFetchInfo::mBaseURL. r=bthrall,dom-worker-reviewers,asuth"
This reverts commit 472f447c9e.
Revert "Bug 2031200 - Part 3: Sync LoadedScript::mReferrerPolicy and ScriptFetchInfo::mReferrerPolicy. r=bthrall"
This reverts commit b5410280f5.
Revert "Bug 2031200 - Part 2: Remove obsolete code to sync the exact same field. r=bthrall"
This reverts commit 2b784b6e6f.
Revert "Bug 2031200 - Part 1: Add ScriptFetchInfo class and ScriptLoadRequest::mFetchInfo field. r=bthrall"
This reverts commit fc8d3b6c48.
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