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
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 only way we can distinguish between JavaScript and wasm modules is
using the mime type in the http response. This adds a field to track this
information in the load request, so we know later on if we should
attempt to compile the module as JavaScript or wasm.
Differential Revision: https://phabricator.services.mozilla.com/D270150
A large module will be compiled off-thread, leaving its state as
State::Compiling when the module script is fetched. Update the
assertion in SetErroredLoadingImports to account for this scenario.
Differential Revision: https://phabricator.services.mozilla.com/D268434
To indicate the loading error for a top-level of the module from the dynamic import
is successfully fetched and parsed, but one of its dependencies fails to fetch
or compile.
//Example
import("a.mjs");
// a.mjs
import "./404.mjs";
This patch allows the ModuleLoadRequest::IsErrored() for "a.mjs" returns
true.
Differential Revision: https://phabricator.services.mozilla.com/D264807
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
To indicate the loading error for a top-level of the module from the dynamic import
is successfully fetched and parsed, but one of its dependencies fails to fetch
or compile.
//Example
import("a.mjs");
// a.mjs
import "./404.mjs";
This patch allows the ModuleLoadRequest::IsErrored() for "a.mjs" returns
true.
Differential Revision: https://phabricator.services.mozilla.com/D264807
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
To indicate the loading error for a top-level of the module from the dynamic import
is successfully fetched and parsed, but one of its dependencies fails to fetch
or compile.
//Example
import("a.mjs");
// a.mjs
import "./404.mjs";
This patch allows the ModuleLoadRequest::IsErrored() for "a.mjs" returns
true.
Differential Revision: https://phabricator.services.mozilla.com/D264807
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
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
Previously we passed the module object for modules and nullptr for other cases.
This patch makes it so we pass the script for both module and classic script
referrers, and nullptr for the realm case.
Differential Revision: https://phabricator.services.mozilla.com/D260942
Since the module graph is now traversed within the JS engine itself, the
related data structures in the host layer are no longer necessary.
Differential Revision: https://phabricator.services.mozilla.com/D255129