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

Unified Diff: include/v8.h

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
« no previous file with comments | « no previous file | src/api.cc » ('j') | src/ast/ast.h » ('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..c956bc0ca120aef2a9bd7570d5871aedb2ee7a35 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -1071,6 +1071,14 @@ class V8_EXPORT Module {
* Returns the completion value.
*/
V8_WARN_UNUSED_RESULT MaybeLocal<Value> Evaluate(Local<Context> context);
+
+ static bool FinishDynamicImportSuccess(Local<Context> context,
adamk 2017/03/15 21:36:43 It looks like this returns false if PromiseResolve
gsathya 2017/03/16 00:59:24 Done.
+ Local<Promise> promise,
+ Local<Module> module);
+
+ static bool FinishDynamicImportFailure(Local<Context> context,
+ Local<Promise> promise,
+ Local<Value> exception);
};
/**
@@ -5787,6 +5795,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);
adamk 2017/03/15 21:36:43 As previously discussed, can you type the 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 +6349,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 +6413,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/ast/ast.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698