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.
According to the spec, requests created in HostLoadImportedModule have
the isTopLevel flag set to false. This means both static and dynamic
import requests should also have this flag set to false.
[HostLoadImportedModule](https://html.spec.whatwg.org/#hostloadimportedmodule)
Step 14. Fetch a single imported module script ...
[Fetch a single imported module script](https://html.spec.whatwg.org/#fetch-a-single-imported-module-script)
Step 4. Fetch a single module script given url, fetchClient, destination, options, settingsObject, referrer, moduleRequest, false, and onComplete.
The false argument in the second-to-last parameter of 'Fetch a single
module script' corresponds to the top-levl flag.
[Fetch a single module script](https://html.spec.whatwg.org/#fetch-a-single-module-script)
given a URL url, an environment settings object fetchClient, a
destination destination, a script fetch options options, an environment
settings object settingsObject, a referrer referrer, an optional
ModuleRequest Record moduleRequest, a boolean isTopLevel, an algorithm
onComplete,
The spec was updated in https://github.com/whatwg/html/issues/7996. We’re
updating the implementation to reflect this change.
Differential Revision: https://phabricator.services.mozilla.com/D265593
According to the spec, requests created in HostLoadImportedModule have
the isTopLevel flag set to false. This means both static and dynamic
import requests should also have this flag set to false.
[HostLoadImportedModule](https://html.spec.whatwg.org/#hostloadimportedmodule)
Step 14. Fetch a single imported module script ...
[Fetch a single imported module script](https://html.spec.whatwg.org/#fetch-a-single-imported-module-script)
Step 4. Fetch a single module script given url, fetchClient, destination, options, settingsObject, referrer, moduleRequest, false, and onComplete.
The false argument in the second-to-last parameter of 'Fetch a single
module script' corresponds to the top-levl flag.
[Fetch a single module script](https://html.spec.whatwg.org/#fetch-a-single-module-script)
given a URL url, an environment settings object fetchClient, a
destination destination, a script fetch options options, an environment
settings object settingsObject, a referrer referrer, an optional
ModuleRequest Record moduleRequest, a boolean isTopLevel, an algorithm
onComplete,
The spec was updated in https://github.com/whatwg/html/issues/7996. We’re
updating the implementation to reflect this change.
Differential Revision: https://phabricator.services.mozilla.com/D265593
According to the spec, requests created in HostLoadImportedModule have
the isTopLevel flag set to false. This means both static and dynamic
import requests should also have this flag set to false.
[HostLoadImportedModule](https://html.spec.whatwg.org/#hostloadimportedmodule)
Step 14. Fetch a single imported module script ...
[Fetch a single imported module script](https://html.spec.whatwg.org/#fetch-a-single-imported-module-script)
Step 4. Fetch a single module script given url, fetchClient, destination, options, settingsObject, referrer, moduleRequest, false, and onComplete.
The false argument in the second-to-last parameter of 'Fetch a single
module script' corresponds to the top-levl flag.
[Fetch a single module script](https://html.spec.whatwg.org/#fetch-a-single-module-script)
given a URL url, an environment settings object fetchClient, a
destination destination, a script fetch options options, an environment
settings object settingsObject, a referrer referrer, an optional
ModuleRequest Record moduleRequest, a boolean isTopLevel, an algorithm
onComplete,
The spec was updated in https://github.com/whatwg/html/issues/7996. We’re
updating the implementation to reflect this change.
Differential Revision: https://phabricator.services.mozilla.com/D265593
If the script is redirected, the redirected URL will be stored in
BaseURL(), therefore we should change to use BaseURL instead.
Differential Revision: https://phabricator.services.mozilla.com/D263371
If the script is redirected, the redirected URL will be stored in
BaseURL(), therefore we should change to use BaseURL instead.
Differential Revision: https://phabricator.services.mozilla.com/D263371
There are shared path between "save bytecode" vs "cache stencil".
This patch just renames everything, and the subsequent bugs and patches will
split the flag and methods.
Differential Revision: https://phabricator.services.mozilla.com/D260911
As a preparation to calculate the "bytecode encoding" separately than "do cache"
for the navigation cache, we should always calculate the flag.
Differential Revision: https://phabricator.services.mozilla.com/D260910
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 reverts commit 99ce61fb4e.
Revert "Bug 1973206 - Part 5: Remove unused variable in ScriptLoader::MaybePrepareModuleForBytecodeEncodingBeforeExecute. r=nbp"
This reverts commit 73dd64fbdc.
Revert "Bug 1973206 - Part 4: Filter out JSON modules earlier in ScriptLoader::CalculateBytecodeCacheFlag. r=nbp"
This reverts commit 5c8d191154.
Revert "Bug 1973206 - Part 3: Move CalculateBytecodeCacheFlag to instance method as a preparation for the subsequent patches. r=nbp"
This reverts commit 2e9c7ce88a.
Revert "Bug 1973206 - Part 2: Verify the list in IsAlreadyHandledForBytecodeEncodingPreparation. r=nbp"
This reverts commit 64d3a74e4d.
Refactors execution behavior to run asynchronously for inline scripts that are
not generated by the parser.
spec:
https://html.spec.whatwg.org/#prepare-the-script-element
Step 32. If el does not have a src content attribute:
2. type: "module"
...
3. Fetch an inline module script graph, given source text, base URL, settings object, options, and with the following steps given result:
1. Queue an element task on the networking task source given el to perform the following steps:
1. Mark as ready el given result.
Step 33. If ... el's type is "module":
3. Otherwise, if el is not parser-inserted:
3.2.1 Execute the script element scripts[0].
Differential Revision: https://phabricator.services.mozilla.com/D254202