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

Unified Diff: src/isolate.cc

Issue 2703563002: [ESNext] Implement DynamicImportCall (Closed)
Patch Set: fix build 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
Index: src/isolate.cc
diff --git a/src/isolate.cc b/src/isolate.cc
index 50692c167954c40d156581dfb00c214a478963b8..6162d3d27dd560a1acc54345d26dab760fe8e2d9 100644
--- a/src/isolate.cc
+++ b/src/isolate.cc
@@ -3326,6 +3326,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();

Powered by Google App Engine
This is Rietveld 408576698