Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(932)

Unified Diff: src/isolate.cc

Issue 2703563002: [ESNext] Implement DynamicImportCall (Closed)
Patch Set: add test + comments Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« include/v8.h ('K') | « src/isolate.h ('k') | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/isolate.cc
diff --git a/src/isolate.cc b/src/isolate.cc
index 461aaf0de7d3439bbf64ab51426ab716450e6660..37e81c0e61b6058eba1c460363ab8feab0507a86 100644
--- a/src/isolate.cc
+++ b/src/isolate.cc
@@ -3334,6 +3334,21 @@ void Isolate::DebugStateUpdated() {
promise_hook_or_debug_is_active_ = promise_hook_ || debug()->is_active();
}
+void Isolate::RunHostImportModuleDynamicallyCallback(
+ Handle<String> source_url, Handle<String> specifier,
+ Handle<JSPromise> promise) {
+ if (host_import_module_dynamically_callback_ == nullptr) return;
+
+ host_import_module_dynamically_callback_(
+ reinterpret_cast<v8::Isolate*>(this), v8::Utils::ToLocal(source_url),
+ v8::Utils::ToLocal(specifier), v8::Utils::PromiseToLocal(promise));
+}
+
+void Isolate::SetHostImportModuleDynamicallyCallback(
+ HostImportModuleDynamicallyCallback callback) {
+ host_import_module_dynamically_callback_ = callback;
+}
+
void Isolate::SetPromiseHook(PromiseHook hook) {
promise_hook_ = hook;
DebugStateUpdated();
« include/v8.h ('K') | « src/isolate.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698