mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-29 07:03:29 +00:00
Allow root modules to imported modules
Root modules (non-cacheable) should register their module_id -> URL so that, if they load a nested module, we can get the full URL of the nested module.
This commit is contained in:
@@ -728,7 +728,9 @@ pub fn Env(comptime State: type, comptime WebApis: type) type {
|
||||
if (try m.instantiate(v8_context, resolveModuleCallback) == false) {
|
||||
return error.ModuleInstantiationError;
|
||||
}
|
||||
|
||||
const arena = self.context_arena;
|
||||
const owned_url = try arena.dupe(u8, url);
|
||||
try self.module_identifier.putNoClobber(arena, m.getIdentityHash(), owned_url);
|
||||
_ = try m.evaluate(v8_context);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user