LoadedScript::{IsTextSource,IsSerializedStencil} accessors can return
false once it's converted to cache.
Most of the consumers need the flag to branch on the server response, before
converting to cache.
Add assertions to avoid accidental use.
Differential Revision: https://phabricator.services.mozilla.com/D299926
The subsequent patches will restrict the ScriptLoadRequest's IsTextSource and
IsSerializedStencil accessors usage, so that they can be used only before
they're converted to cached stencil.
This patch rewrites their consumer after that point to directly use the
underlying LoadedScript accessors and methods.
Differential Revision: https://phabricator.services.mozilla.com/D299924
ModuleScript is used only as the place to hold the compilation and evaluation
result of modules, and it's no longer necessary to be a LoadedScript subclass.
This makes all LoadedScript instances GC-free, and the module's LoadedScript
(temporailry renamed to LoadedModuleScript) can directly be stored into the
SharedScriptCache.
The subsequent patches will cleanup the LoadedScript, its subclasses, and
their consumers.
Differential Revision: https://phabricator.services.mozilla.com/D299916
Replace the all places that stores and uses the script/module private to use
ScriptFetchInfo instead of LoadedScript/ModuleScript, so that the
LoadedScript/ModuleScript can be released earlier.
Differential Revision: https://phabricator.services.mozilla.com/D294339
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.
Replace the all places that stores and uses the script/module private to use
ScriptFetchInfo instead of LoadedScript/ModuleScript, so that the
LoadedScript/ModuleScript can be released earlier.
Differential Revision: https://phabricator.services.mozilla.com/D294339
Cancel preloading requests, regardless the pref is on or off.
When the pref is on (multiple import maps is enabled), mFetchedModules
may contain module scripts that have been fetched during normal loading,
therefore we don't update it.
Differential Revision: https://phabricator.services.mozilla.com/D275179
When registering an import map, we must remove any preloaded scripts
because their resolved URLs may no longer be valid under the new import
map.
Differential Revision: https://phabricator.services.mozilla.com/D272783
When the preloaded request is reused during parsing, merge the preloaded
resolved module set into the global resolved module set to ensure consistency.
Differential Revision: https://phabricator.services.mozilla.com/D275178
Allocate a ResolvedModuleSet in the top-level preloading module script, and
use the `aHostDefined` parameter in HostLoadImportedModule to get the
corresponding preloaded ResolvedModuleSet.
Differential Revision: https://phabricator.services.mozilla.com/D272782
The addition is performed after resolution so that resolved specifiers
can be processed more easily, particularly for preload requests. This
change also refactors the return value of ResolvedModuleSpecifier to use
a SpecifierResolutionRecord instead.
Differential Revision: https://phabricator.services.mozilla.com/D272779
This reverts commit 7604e737be.
Revert "Bug 1995558: Service worker module registration should be rejected in case of any evaluation errors.r=edenchuang,dom-worker-reviewers"
This reverts commit ac602ed98c.
Revert "Bug 1990925: Module service workers should be able to load json modules.r=edenchuang,dom-worker-reviewers"
This reverts commit dc6f670880.
Revert "Bug 1989386: Correctly update serviceworker type on re-registration.r=edenchuang,dom-worker-reviewers"
This reverts commit bd63d6b6d0.
Revert "Bug 1360870: on-disk schema changes to persist new serviceworker type parameter.r=edenchuang,dom-worker-reviewers"
This reverts commit 9f740083c9.
Revert "Bug 1360870: Some source code plumbing and refactorings to support new serviceworker type.r=edenchuang,dom-worker-reviewers"
This reverts commit e813c3de2f.
Revert "Bug 1360870: idl changes to support module service workers.r=asuth,edenchuang,webidl,smaug,dom-worker-reviewers"
This reverts commit 2b4f2ed60e.
This reverts commit 5308d85d13.
Revert "Bug 1995558: Service worker module registration should be rejected in case of any evaluation errors.r=edenchuang,dom-worker-reviewers"
This reverts commit 262e9c7f22.
Revert "Bug 1990925: Module service workers should be able to load json modules.r=edenchuang,dom-worker-reviewers"
This reverts commit 5e00fd86aa.
Revert "Bug 1989386: Correctly update serviceworker type on re-registration.r=edenchuang,dom-worker-reviewers"
This reverts commit 137e22f440.
Revert "Bug 1360870: on-disk schema changes to persist new serviceworker type parameter.r=edenchuang,dom-worker-reviewers"
This reverts commit bf551670f4.
Revert "Bug 1360870: Some source code plumbing and refactorings to support new serviceworker type.r=edenchuang,dom-worker-reviewers"
This reverts commit 040663a23b.
Revert "Bug 1360870: idl changes to support module service workers.r=asuth,edenchuang,webidl,smaug,dom-worker-reviewers"
This reverts commit c8854f0a27.
In contrast to other fields, mBaseURL is not populated in the constructors.
Thus we just need to remove the ScriptLoadRequest::mBaseURL field and
use the LoadedScript::mBaseURL instead.
Differential Revision: https://phabricator.services.mozilla.com/D267360
In contrast to other fields, mBaseURL is not populated in the constructors.
Thus we just need to remove the ScriptLoadRequest::mBaseURL field and
use the LoadedScript::mBaseURL instead.
Differential Revision: https://phabricator.services.mozilla.com/D267360