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(); |