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
In order to stop collecting delazifications, hold any newly-started collections'
scripts and modules.
The later patches will add the code to stop on each situation.
Differential Revision: https://phabricator.services.mozilla.com/D294590
This reverts commit 1e6f986667.
Revert "Bug 2031078 - Part 5: Stop collecting delazifications on memory pressure. r=bthrall"
This reverts commit 52e7376bc2.
Revert "Bug 2031078 - Part 4: Distinguish the call JS::StartCollectingDelazifications on a script with asm.js. r=bthrall"
This reverts commit 62233eb1f0.
Revert "Bug 2031078 - Part 3: Ignore JS::AbortCollectingDelazifications call on not-collecting cases. r=bthrall"
This reverts commit a51e0ee4eb.
Revert "Bug 2031078 - Part 2: Make JS::AbortCollectingDelazifications take raw pointer. r=bthrall"
This reverts commit 285dd9183b.
Revert "Bug 2031078 - Part 1: Hold scripts and modules while collecting delazifications. r=bthrall,mccr8"
This reverts commit 0c81cde149.
In order to stop collecting delazifications, hold any newly-started collections'
scripts and modules.
The later patches will add the code to stop on each situation.
Differential Revision: https://phabricator.services.mozilla.com/D294590
This moves common code for compiling CSS module scripts into a
function, that we can then use in both ModuleLoader and
mozJSModuleLoader.
Differential Revision: https://phabricator.services.mozilla.com/D291333
This moves common code for compiling CSS module scripts into a
function, that we can then use in both ModuleLoader and
mozJSModuleLoader.
Differential Revision: https://phabricator.services.mozilla.com/D291333
The current error message is bad, we should at least mention that it
was the CSS module compilation that failed.
I've also added some basic logging for when the module mime type check
fails, even though I'm familiar with the code, it took me more time
than it should have to realize this was what was causing the css module
in the extension to fail loading.
Differential Revision: https://phabricator.services.mozilla.com/D284112
Currently Gecko only set mIsPreload to true for the top-level preloading
load. To identify a non-top-level preload, update mIsPreload accordingly
to match the mIsPreload flag from the root module.
Differential Revision: https://phabricator.services.mozilla.com/D281154
Rename CreateCSSModule to CreateDefaultExportSyntheticModule and remove the
unused ReadOnlyCompileOptions parameter. Update the call in ModuleLoader.cpp
to use the new function signature, and replace the duplicate code in
CompileJsonModule.
Differential Revision: https://phabricator.services.mozilla.com/D271453
Add support for JS::ModuleType::Bytes in Worker and Worklet loaders.
Duplicate Unknown handling and restrict IsModuleTypeAllowed to JS and
JSON modules only.
Differential Revision: https://phabricator.services.mozilla.com/D270803
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 order to remove ScriptLoadRequest::mReferrerPolicy field, we should directly
pass ReferrerPolicy to the LoadedScript constructor.
Differential Revision: https://phabricator.services.mozilla.com/D267354
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 order to remove ScriptLoadRequest::mReferrerPolicy field, we should directly
pass ReferrerPolicy to the LoadedScript constructor.
Differential Revision: https://phabricator.services.mozilla.com/D267354
This reverts commit b10b7c8add.
Revert "Bug 1991081 - Part 6: Remove testing-only events from EncodeBytecodeAndSave. r=nbp"
This reverts commit caf275708e.
Revert "Bug 1991081 - Part 5: Use single field for SRI and optional bytecode, for bytecode case and for cached stencil case. r=nbp"
This reverts commit 86631a6e10.
Revert "Bug 1991081 - Part 4: Use LoadedScript for logging in EncodeBytecodeAndSave. r=nbp"
This reverts commit 0f9d7f11e8.
Revert "Bug 1991081 - Part 3: Store nsICacheInfoChannel to LoadedScript also in text and bytecode variants. r=nbp"
This reverts commit 370f5bcd48.
Revert "Bug 1991081 - Part 2: Store stencil to LoadedScript also in text and bytecode variants. r=nbp"
This reverts commit 7eaf4f425f.
Revert "Bug 1991081 - Part 1: Rename Stencil variant to CachedStencil in LoadedScript. r=nbp"
This reverts commit a7a6ce8f6f.