Created
November 15, 2018 23:04
-
-
Save arturovt/f53d6b0f04c26454e343ab36d82d3a96 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
RUNTIME_FUNCTION(Runtime_DynamicImportCall) { | |
HandleScope scope(isolate); | |
DCHECK_EQ(2, args.length()); | |
CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0); | |
CONVERT_ARG_HANDLE_CHECKED(Object, specifier, 1); | |
Handle<Script> script(Script::cast(function->shared()->script()), isolate); | |
while (script->has_eval_from_shared()) { | |
script = handle(Script::cast(script->eval_from_shared()->script()), isolate); | |
} | |
RETURN_RESULT_OR_FAILURE( | |
isolate, | |
isolate->RunHostImportModuleDynamicallyCallback(script, specifier) | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment