summaryrefslogtreecommitdiff
path: root/libdeno/internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'libdeno/internal.h')
-rw-r--r--libdeno/internal.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/libdeno/internal.h b/libdeno/internal.h
index 08e5cc0f5..f8b587658 100644
--- a/libdeno/internal.h
+++ b/libdeno/internal.h
@@ -14,6 +14,9 @@ struct deno_s {
std::string last_exception;
v8::Persistent<v8::Function> recv;
v8::Persistent<v8::Function> global_error_handler;
+ v8::Persistent<v8::Function> promise_reject_handler;
+ v8::Persistent<v8::Function> promise_error_examiner;
+ int32_t pending_promise_events;
v8::Persistent<v8::Context> context;
v8::Persistent<v8::Map> async_data_map;
deno_recv_cb cb;
@@ -32,10 +35,16 @@ void Print(const v8::FunctionCallbackInfo<v8::Value>& args);
void Recv(const v8::FunctionCallbackInfo<v8::Value>& args);
void Send(const v8::FunctionCallbackInfo<v8::Value>& args);
void SetGlobalErrorHandler(const v8::FunctionCallbackInfo<v8::Value>& args);
+void SetPromiseRejectHandler(const v8::FunctionCallbackInfo<v8::Value>& args);
+void SetPromiseErrorExaminer(const v8::FunctionCallbackInfo<v8::Value>& args);
static intptr_t external_references[] = {
- reinterpret_cast<intptr_t>(Print), reinterpret_cast<intptr_t>(Recv),
+ reinterpret_cast<intptr_t>(Print),
+ reinterpret_cast<intptr_t>(Recv),
reinterpret_cast<intptr_t>(Send),
- reinterpret_cast<intptr_t>(SetGlobalErrorHandler), 0};
+ reinterpret_cast<intptr_t>(SetGlobalErrorHandler),
+ reinterpret_cast<intptr_t>(SetPromiseRejectHandler),
+ reinterpret_cast<intptr_t>(SetPromiseErrorExaminer),
+ 0};
Deno* NewFromSnapshot(void* user_data, deno_recv_cb cb);