Skip to content
Browse files

v8: backport header diff from 94283dcf4459f

Backport ABI-incompatible changes from
94283dcf4459f (“[ESNext] Implement DynamicImportCall”).

Ref: v8/v8@94283dc

PR-URL: #12875
Reviewed-By: James M Snell <>
  • Loading branch information...
addaleax authored and jasnell committed May 6, 2017
1 parent 1bb880b commit a947cf9a03991f82927315eb7315047ef95f291f
Showing with 34 additions and 1 deletion.
  1. +34 −1 deps/v8/include/v8.h
@@ -1071,6 +1071,9 @@ class V8_EXPORT Module {
V8_WARN_UNUSED_RESULT MaybeLocal<Value> Evaluate(Local<Context> context);

// Node.js-specific: This will be implemented by a later V8 upgrade!
class DynamicImportResult;

* A compiled JavaScript script, tied to a Context which was active when the
* script was compiled.
@@ -5794,6 +5797,25 @@ typedef void (*BeforeCallEnteredCallback)(Isolate*);
typedef void (*CallCompletedCallback)(Isolate*);
typedef void (*DeprecatedCallCompletedCallback)();

* HostImportDynamicallyCallback is called when we require the
* embedder to load a module. This is used as part of the dynamic
* import syntax. The behavior of this callback is not specified in
* EcmaScript.
* The referrer is the name of the file which calls the dynamic
* import. The referrer can be used to resolve the module location.
* The specifier is the name of the module that should be imported.
* The DynamicImportResult object is used to signal success or failure
* by calling it's respective methods.
typedef void (*HostImportModuleDynamicallyCallback)(
Isolate* isolate, Local<String> referrer, Local<String> specifier,
Local<DynamicImportResult> result);

* 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
@@ -6343,7 +6365,8 @@ class V8_EXPORT Isolate {
allow_atomics_wait(true) {}
host_import_module_dynamically_callback_(nullptr) {}

* The optional entry_hook allows the host application to provide the
@@ -6405,6 +6428,16 @@ class V8_EXPORT Isolate {
* this isolate.
bool allow_atomics_wait;

* This is an unfinished experimental feature, and is only exposed
* here for internal testing purposes. DO NOT USE.
* This specifies the callback called by the upcoming dynamic
* import() language feature to load modules.

0 comments on commit a947cf9

Please sign in to comment.
You can’t perform that action at this time.