You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original commit message:
[api] Add index-based module resolution in InstantiateModule()
Add new InstantiateModule() overload that allows embedders to identify
modules requests by index in the module requests array rather than
using specifier and import attributes. When embedders want to fetch
all the modules using information from module->GetModuleRequests()
before calling InstantiateModule() instead of having to do the fetching
inside the InstantiateModule() callback, they could just maintain a simple array of modules indexed by module request positions and
look up the fetched the module by index in the new callback.
Previously this has to be done by mapping from specifier and import
attributes to module objects cached on the embedder side, leading to an overhead to hash the specifier and import attributes for each module request.
Refs: #59396
Bug: 435317398
Change-Id: Ie017d2f3ccc605e0f58aa423504b5fa5fdbcc633
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6804466
Commit-Queue: Joyee Cheung <[email protected]>
Reviewed-by: Camillo Bruni <[email protected]>
Cr-Commit-Position: refs/heads/main@{#102613}
Refs: v8/v8@3d0f462
PR-URL: #59396
Refs: https://chromium-review.googlesource.com/c/v8/v8/+/6804466
Reviewed-By: Chengzhong Wu <[email protected]>
0 commit comments