-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Get import assertions from v8::ModuleRequest and add them to blink::M…
…oduleRequest This is the first in a series of changes that will implement import assertions integration in Blink and tie the assertions into the existing JSON and CSS module prototypes. See the import assertions spec [1], the HTML integration PR [2], and the I2P [3]. This change retrieves the import assertions from V8 in ModuleRequest::ModuleRequests and in the ResolveModuleCallback. The code to unpack them is moved inside blink::ModuleRequest to avoid code duplication across those two places. ModuleRequest is upgraded from a struct to a class now that its constructors are no longer trivial. ModuleRequest is passed to ModuleRecordResolver::Resolve in place of the specifier, where the import assertions will eventually be used alongside the specifier to resolve the module. IsolateHolder now passes "type" as a supported assertion via V8 Isolate::CreateParams so that Blink will start receiving module "type" assertions. Subsequent changes will add the assertions to the module map key and require the correct assertion to be present before a JSON or CSS module can be successfully loaded. [1] https://tc39.es/proposal-import-assertions [2] whatwg/html#5883 [3] https://groups.google.com/u/1/a/chromium.org/g/blink-dev/c/Xft04J07Oh0/m/RLPMXVEiAAAJ Bug: 1132413 Change-Id: Id41e9e470d3c4ed1988d8dfa1ef8fa26cd9d23a9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2597778 Commit-Queue: Dan Clark <daniec@microsoft.com> Reviewed-by: Kouhei Ueno <kouhei@chromium.org> Reviewed-by: Jochen Eisinger <jochen@chromium.org> Reviewed-by: Hiroshige Hayashizaki <hiroshige@chromium.org> Reviewed-by: Dominic Farolino <dom@chromium.org> Cr-Commit-Position: refs/heads/master@{#839060} GitOrigin-RevId: b4c95a469497c44c863c4593246783876eae6c18
- Loading branch information
Showing
11 changed files
with
128 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters