From 13582ff3f2478f2e2cafa3042fc6aa96ae5049c5 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Tue, 29 Jan 2019 11:32:40 -0500 Subject: libdeno: improve exception handling --- libdeno/internal.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libdeno/internal.h') diff --git a/libdeno/internal.h b/libdeno/internal.h index 39e578e66..d1b9f1d96 100644 --- a/libdeno/internal.h +++ b/libdeno/internal.h @@ -40,6 +40,10 @@ class DenoIsolate { delete array_buffer_allocator_; } + static inline DenoIsolate* FromIsolate(v8::Isolate* isolate) { + return static_cast(isolate->GetData(0)); + } + void AddIsolate(v8::Isolate* isolate); void RegisterModule(const char* filename, v8::Local module); void ResolveOk(const char* filename, const char* source); @@ -115,12 +119,14 @@ void Shared(v8::Local property, const v8::PropertyCallbackInfo& info); void BuiltinModules(v8::Local property, const v8::PropertyCallbackInfo& info); +void MessageCallback(v8::Local message, v8::Local data); static intptr_t external_references[] = { reinterpret_cast(Print), reinterpret_cast(Recv), reinterpret_cast(Send), reinterpret_cast(Shared), reinterpret_cast(BuiltinModules), + reinterpret_cast(MessageCallback), 0}; static const deno_buf empty_buf = {nullptr, 0, nullptr, 0}; -- cgit v1.2.3