| Index: src/runtime/runtime-module.cc
|
| diff --git a/src/runtime/runtime-module.cc b/src/runtime/runtime-module.cc
|
| index f36a09b410bf00a8658882f021f0918bd6aff2c3..4e858d224a9f9d526867105c73c0bef8c5a5bc6e 100644
|
| --- a/src/runtime/runtime-module.cc
|
| +++ b/src/runtime/runtime-module.cc
|
| @@ -13,9 +13,16 @@ namespace internal {
|
|
|
| RUNTIME_FUNCTION(Runtime_DynamicImportCall) {
|
| HandleScope scope(isolate);
|
| - DCHECK_EQ(1, args.length());
|
| - // TODO(gsathya): Implement ImportCall.
|
| - return isolate->heap()->undefined_value();
|
| + DCHECK_EQ(2, args.length());
|
| + CONVERT_ARG_HANDLE_CHECKED(String, source_url, 0);
|
| + CONVERT_ARG_HANDLE_CHECKED(Object, specifier, 1);
|
| + Handle<String> specifier_str;
|
| + ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, specifier_str,
|
| + Object::ToString(isolate, specifier));
|
| + Handle<JSPromise> promise = isolate->factory()->NewJSPromise();
|
| + isolate->RunHostImportModuleDynamicallyCallback(source_url, specifier_str,
|
| + promise);
|
| + return *promise;
|
| }
|
|
|
| RUNTIME_FUNCTION(Runtime_GetModuleNamespace) {
|
|
|