Chromium Code Reviews| Index: include/v8.h |
| diff --git a/include/v8.h b/include/v8.h |
| index beba2bb97c7e9331ae6bde2df3d3a3f7edffa09f..9458686b3b3db4d7fc66219a10c595ccb1fa4f3c 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); |
|
neis
2017/03/17 10:36:31
Please add a comment for these too.
gsathya
2017/03/17 21:47:59
Done.
|
| }; |
| /** |
| @@ -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 |
|
neis
2017/03/17 10:36:31
You could do that now :)
gsathya
2017/03/17 21:47:59
Done.
|
| + */ |
| + HostImportModuleDynamicallyCallback |
| + host_import_module_dynamically_callback_; |
| }; |