Browse Source

src: add node_isolate to remaining scopes

v0.11.1-release
Trevor Norris 12 years ago
committed by Ben Noordhuis
parent
commit
591cfe6b7b
  1. 2
      src/node.cc
  2. 4
      src/node_crypto.cc
  3. 2
      src/node_internals.h
  4. 2
      src/node_object_wrap.h
  5. 2
      src/req_wrap.h
  6. 2
      src/tcp_wrap.cc

2
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 = Context::New();

4
src/node_crypto.cc

@ -638,7 +638,7 @@ Handle<Value> SecureContext::SetSessionIdContext(const Arguments& args) {
}
Handle<Value> SecureContext::SetSessionTimeout(const Arguments& args) {
HandleScope scope;
HandleScope scope(node_isolate);
SecureContext *sc = ObjectWrap::Unwrap<SecureContext>(args.Holder());
@ -3567,7 +3567,7 @@ static void array_push_back(const TypeName* md,
Handle<Value> GetCiphers(const Arguments& args) {
HandleScope scope;
HandleScope scope(node_isolate);
Local<Array> arr = Array::New();
EVP_CIPHER_do_all_sorted(array_push_back<EVP_CIPHER>, &arr);
return scope.Close(arr);

2
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)

2
src/node_object_wrap.h

@ -116,7 +116,7 @@ class NODE_EXTERN ObjectWrap {
static void WeakCallback(v8::Isolate* env,
v8::Persistent<v8::Value> value,
void* data) {
v8::HandleScope scope;
v8::HandleScope scope(node_isolate);
ObjectWrap *obj = static_cast<ObjectWrap*>(data);
assert(value == obj->handle_);

2
src/req_wrap.h

@ -35,7 +35,7 @@ template <typename T>
class ReqWrap {
public:
ReqWrap() {
v8::HandleScope scope;
v8::HandleScope scope(node_isolate);
object_ = v8::Persistent<v8::Object>::New(node_isolate, v8::Object::New());
v8::Local<v8::Value> domain = v8::Context::GetCurrent()

2
src/tcp_wrap.cc

@ -258,7 +258,7 @@ Handle<Value> TCPWrap::SetSimultaneousAccepts(const Arguments& args) {
Handle<Value> TCPWrap::Open(const Arguments& args) {
HandleScope scope;
HandleScope scope(node_isolate);
UNWRAP(TCPWrap)
int fd = args[0]->IntegerValue();
uv_tcp_open(&wrap->handle_, fd);

Loading…
Cancel
Save