From dfcde3e1eecc03a97d9e395ee9e61b7e03f1354d Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Sun, 26 Aug 2018 19:22:07 +0200 Subject: format --- libdeno/binding.cc | 18 ++++++++++++------ libdeno/internal.h | 8 ++++---- 2 files changed, 16 insertions(+), 10 deletions(-) (limited to 'libdeno') diff --git a/libdeno/binding.cc b/libdeno/binding.cc index 583b22fbb..7a79bf199 100644 --- a/libdeno/binding.cc +++ b/libdeno/binding.cc @@ -47,7 +47,8 @@ void HandleExceptionStr(v8::Local context, auto global_error_handler = d->global_error_handler.Get(isolate); if (!global_error_handler.IsEmpty()) { - // global_error_handler is set so we try to handle the exception in javascript. + // global_error_handler is set so we try to handle the exception in + // javascript. v8::Local args[5]; args[0] = exception->ToString(); args[1] = message->GetScriptResourceName(); @@ -235,7 +236,8 @@ void SetGlobalErrorHandler(const v8::FunctionCallbackInfo& args) { v8::HandleScope handle_scope(isolate); if (!d->global_error_handler.IsEmpty()) { - isolate->ThrowException(v8_str("libdeno.setGlobalErrorHandler already called.")); + isolate->ThrowException( + v8_str("libdeno.setGlobalErrorHandler already called.")); return; } @@ -246,7 +248,6 @@ void SetGlobalErrorHandler(const v8::FunctionCallbackInfo& args) { d->global_error_handler.Reset(isolate, func); } - bool ExecuteV8StringSource(v8::Local context, const char* js_filename, v8::Local source) { @@ -313,9 +314,14 @@ void InitializeContext(v8::Isolate* isolate, v8::Local context, auto send_val = send_tmpl->GetFunction(context).ToLocalChecked(); CHECK(deno_val->Set(context, deno::v8_str("send"), send_val).FromJust()); - auto set_global_error_handler_tmpl = v8::FunctionTemplate::New(isolate, SetGlobalErrorHandler); - auto set_global_error_handler_val = set_global_error_handler_tmpl->GetFunction(context).ToLocalChecked(); - CHECK(deno_val->Set(context, deno::v8_str("setGlobalErrorHandler"), set_global_error_handler_val).FromJust()); + auto set_global_error_handler_tmpl = + v8::FunctionTemplate::New(isolate, SetGlobalErrorHandler); + auto set_global_error_handler_val = + set_global_error_handler_tmpl->GetFunction(context).ToLocalChecked(); + CHECK(deno_val + ->Set(context, deno::v8_str("setGlobalErrorHandler"), + set_global_error_handler_val) + .FromJust()); { auto source = deno::v8_str(js_source.c_str()); diff --git a/libdeno/internal.h b/libdeno/internal.h index b1806618b..93fdea5db 100644 --- a/libdeno/internal.h +++ b/libdeno/internal.h @@ -30,10 +30,10 @@ void Print(const v8::FunctionCallbackInfo& args); void Recv(const v8::FunctionCallbackInfo& args); void Send(const v8::FunctionCallbackInfo& args); void SetGlobalErrorHandler(const v8::FunctionCallbackInfo& args); -static intptr_t external_references[] = {reinterpret_cast(Print), - reinterpret_cast(Recv), - reinterpret_cast(Send), - reinterpret_cast(SetGlobalErrorHandler), 0}; +static intptr_t external_references[] = { + reinterpret_cast(Print), reinterpret_cast(Recv), + reinterpret_cast(Send), + reinterpret_cast(SetGlobalErrorHandler), 0}; Deno* NewFromSnapshot(void* data, deno_recv_cb cb); -- cgit v1.2.3