From 591cfe6b7bd622c00a07a77611ee14d64edcf484 Mon Sep 17 00:00:00 2001 From: Trevor Norris Date: Tue, 9 Apr 2013 15:19:47 -0700 Subject: [PATCH] src: add node_isolate to remaining scopes --- src/node.cc | 2 +- src/node_crypto.cc | 4 ++-- src/node_internals.h | 2 +- src/node_object_wrap.h | 2 +- src/req_wrap.h | 2 +- src/tcp_wrap.cc | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/node.cc b/src/node.cc index 6f9194616..f82e75e28 100644 --- a/src/node.cc +++ b/src/node.cc @@ -3143,7 +3143,7 @@ int Start(int argc, char *argv[]) { V8::Initialize(); { Locker locker(node_isolate); - HandleScope handle_scope; + HandleScope handle_scope(node_isolate); // Create the one and only Context. Persistent context = Context::New(); diff --git a/src/node_crypto.cc b/src/node_crypto.cc index 77dd1a3db..b826a123e 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -638,7 +638,7 @@ Handle SecureContext::SetSessionIdContext(const Arguments& args) { } Handle SecureContext::SetSessionTimeout(const Arguments& args) { - HandleScope scope; + HandleScope scope(node_isolate); SecureContext *sc = ObjectWrap::Unwrap(args.Holder()); @@ -3567,7 +3567,7 @@ static void array_push_back(const TypeName* md, Handle GetCiphers(const Arguments& args) { - HandleScope scope; + HandleScope scope(node_isolate); Local arr = Array::New(); EVP_CIPHER_do_all_sorted(array_push_back, &arr); return scope.Close(arr); diff --git a/src/node_internals.h b/src/node_internals.h index 794770874..cf257ab7a 100644 --- a/src/node_internals.h +++ b/src/node_internals.h @@ -78,7 +78,7 @@ inline static int snprintf(char* buf, unsigned int len, const char* fmt, ...) { // sometimes fails to resolve it... #define THROW_ERROR(fun) \ do { \ - v8::HandleScope scope; \ + v8::HandleScope scope(node_isolate); \ return v8::ThrowException(fun(v8::String::New(errmsg))); \ } \ while (0) diff --git a/src/node_object_wrap.h b/src/node_object_wrap.h index 4f86da3f3..1dae7e3f0 100644 --- a/src/node_object_wrap.h +++ b/src/node_object_wrap.h @@ -116,7 +116,7 @@ class NODE_EXTERN ObjectWrap { static void WeakCallback(v8::Isolate* env, v8::Persistent value, void* data) { - v8::HandleScope scope; + v8::HandleScope scope(node_isolate); ObjectWrap *obj = static_cast(data); assert(value == obj->handle_); diff --git a/src/req_wrap.h b/src/req_wrap.h index 1251cea6d..36e0fe56c 100644 --- a/src/req_wrap.h +++ b/src/req_wrap.h @@ -35,7 +35,7 @@ template class ReqWrap { public: ReqWrap() { - v8::HandleScope scope; + v8::HandleScope scope(node_isolate); object_ = v8::Persistent::New(node_isolate, v8::Object::New()); v8::Local domain = v8::Context::GetCurrent() diff --git a/src/tcp_wrap.cc b/src/tcp_wrap.cc index 4d60c8f69..3b9a9b925 100644 --- a/src/tcp_wrap.cc +++ b/src/tcp_wrap.cc @@ -258,7 +258,7 @@ Handle TCPWrap::SetSimultaneousAccepts(const Arguments& args) { Handle TCPWrap::Open(const Arguments& args) { - HandleScope scope; + HandleScope scope(node_isolate); UNWRAP(TCPWrap) int fd = args[0]->IntegerValue(); uv_tcp_open(&wrap->handle_, fd);