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

Unified Diff: include/v8.h

Issue 2703563002: [ESNext] Implement DynamicImportCall (Closed)
Patch Set: use function_closure 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
« no previous file with comments | « no previous file | src/api.cc » ('j') | src/d8.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/v8.h
diff --git a/include/v8.h b/include/v8.h
index d7b7205ef0a0b18e341343875f614ca18fed6610..0eddbd409d455dd9cd104052b6d30227a3940782 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -1071,6 +1071,12 @@ class V8_EXPORT Module {
* Returns the completion value.
*/
V8_WARN_UNUSED_RESULT MaybeLocal<Value> Evaluate(Local<Context> context);
+
+ static V8_WARN_UNUSED_RESULT bool FinishDynamicImportSuccess(
+ Local<Context> context, Local<Promise> promise, Local<Module> module);
+
+ static V8_WARN_UNUSED_RESULT bool FinishDynamicImportFailure(
+ Local<Context> context, Local<Promise> promise, Local<Value> exception);
};
/**
@@ -5787,6 +5793,11 @@ typedef void (*BeforeCallEnteredCallback)(Isolate*);
typedef void (*CallCompletedCallback)(Isolate*);
typedef void (*DeprecatedCallCompletedCallback)();
+typedef void (*HostImportModuleDynamicallyCallback)(Isolate* isolate,
+ Local<String> referrer,
+ Local<String> specifier,
+ Local<Promise> promise);
+
/**
* PromiseHook with type kInit is called when a new promise is
* created. When a new promise is created as part of the chain in the
@@ -6336,7 +6347,8 @@ class V8_EXPORT Isolate {
add_histogram_sample_callback(nullptr),
array_buffer_allocator(nullptr),
external_references(nullptr),
- allow_atomics_wait(true) {}
+ allow_atomics_wait(true),
+ host_import_module_dynamically_callback_(nullptr) {}
/**
* The optional entry_hook allows the host application to provide the
@@ -6399,6 +6411,12 @@ class V8_EXPORT Isolate {
* this isolate.
*/
bool allow_atomics_wait;
+
+ /**
+ * TODO(gsathya): Write doc
+ */
+ HostImportModuleDynamicallyCallback
+ host_import_module_dynamically_callback_;
};
« no previous file with comments | « no previous file | src/api.cc » ('j') | src/d8.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698