Skip to content

Commit

Permalink
WIP: wasm modules in core
Browse files Browse the repository at this point in the history
  • Loading branch information
lucacasonato committed May 4, 2022
1 parent fb390c5 commit dca0c8a
Show file tree
Hide file tree
Showing 11 changed files with 252 additions and 127 deletions.
7 changes: 4 additions & 3 deletions core/bindings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

use crate::error::is_instance_of_error;
use crate::error::JsError;
use crate::modules::get_module_type_from_assertions;
use crate::modules::get_asserted_module_type_from_assertions;
use crate::modules::parse_import_assertions;
use crate::modules::validate_import_assertions;
use crate::modules::ImportAssertionsKind;
Expand Down Expand Up @@ -343,7 +343,8 @@ pub extern "C" fn host_import_module_dynamically_callback(
resolver.reject(tc_scope, e);
}
}
let module_type = get_module_type_from_assertions(&assertions);
let expected_module_type =
get_asserted_module_type_from_assertions(&assertions);

let resolver_handle = v8::Global::new(scope, resolver);
{
Expand All @@ -358,7 +359,7 @@ pub extern "C" fn host_import_module_dynamically_callback(
module_map_rc,
&specifier_str,
&referrer_name_str,
module_type,
expected_module_type,
resolver_handle,
);
state_rc.borrow_mut().notify_new_dynamic_import();
Expand Down
Loading

0 comments on commit dca0c8a

Please sign in to comment.