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.
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
Per spec, [[ErrorToRethrow]] is only set for static imports and
top-level modules [1]. Accordingly, an assertion was added to require
non-dynamic imports when hasRethrow is true.
However, during a dynamic import, if the module script has already been
fetched, the cached module is returned (See HTML “fetch a single module
script”, step 6) [2]. In that case, a previously fetched module may already
carry [[ErrorToRethrow]], and this value is propagated to the dynamic
import.
This causes the assertion to fire for valid dynamic-import behavior. The
assertion is therefore incorrect and must be removed.
[1]: https://html.spec.whatwg.org/#fetch-the-descendants-of-and-link-a-module-script
[2]: https://html.spec.whatwg.org/#fetch-a-single-module-script
Differential Revision: https://phabricator.services.mozilla.com/D278670
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
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