From 7788a6bf85d9dd98eed3ad2cfaf1823fd6f8ae90 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Mon, 7 Jan 2013 00:15:59 +0100 Subject: [PATCH] src: pass node_isolate to Undefined() --- src/fs_event_wrap.cc | 4 +++- src/handle_wrap.cc | 4 ++-- src/node.cc | 34 +++++++++++++++++----------------- src/node_buffer.cc | 4 ++-- src/node_counters.cc | 12 ++++++------ src/node_crypto.cc | 22 +++++++++++----------- src/node_dtrace.cc | 32 ++++++++++++++++---------------- src/node_file.cc | 32 ++++++++++++++++---------------- src/node_http_parser.cc | 4 ++-- src/node_os.cc | 10 +++++----- src/node_stat_watcher.cc | 4 ++-- src/node_zlib.cc | 6 +++--- src/tcp_wrap.cc | 6 +++--- src/tty_wrap.cc | 4 ++-- src/v8_typed_array.cc | 20 +++++++++++++------- 15 files changed, 103 insertions(+), 95 deletions(-) diff --git a/src/fs_event_wrap.cc b/src/fs_event_wrap.cc index e8ad23719d7..ebc085fa005 100644 --- a/src/fs_event_wrap.cc +++ b/src/fs_event_wrap.cc @@ -175,7 +175,9 @@ Handle FSEventWrap::Close(const Arguments& args) { void* ptr = args.Holder()->GetAlignedPointerFromInternalField(0); FSEventWrap* wrap = static_cast(ptr); - if (wrap == NULL || wrap->initialized_ == false) return Undefined(); + if (wrap == NULL || wrap->initialized_ == false) { + return Undefined(node_isolate); + } wrap->initialized_ = false; return HandleWrap::Close(args); diff --git a/src/handle_wrap.cc b/src/handle_wrap.cc index 4e04f827a5c..3bf101852dc 100644 --- a/src/handle_wrap.cc +++ b/src/handle_wrap.cc @@ -66,7 +66,7 @@ Handle HandleWrap::Ref(const Arguments& args) { wrap->unref_ = false; } - return v8::Undefined(); + return v8::Undefined(node_isolate); } @@ -80,7 +80,7 @@ Handle HandleWrap::Unref(const Arguments& args) { wrap->unref_ = true; } - return v8::Undefined(); + return v8::Undefined(node_isolate); } diff --git a/src/node.cc b/src/node.cc index d71937a17fe..dfd2a38749c 100644 --- a/src/node.cc +++ b/src/node.cc @@ -205,7 +205,7 @@ static void StartTickSpinner() { static Handle NeedTickCallback(const Arguments& args) { StartTickSpinner(); - return Undefined(); + return Undefined(node_isolate); } @@ -956,7 +956,7 @@ MakeCallback(const Handle object, if (try_catch.HasCaught()) { FatalException(try_catch); - return Undefined(); + return Undefined(node_isolate); } return scope.Close(ret); @@ -1312,7 +1312,7 @@ Handle GetActiveHandles(const Arguments& args) { static Handle Abort(const Arguments& args) { abort(); - return Undefined(); + return Undefined(node_isolate); } @@ -1331,7 +1331,7 @@ static Handle Chdir(const Arguments& args) { return ThrowException(UVException(r.code, "uv_chdir")); } - return Undefined(); + return Undefined(node_isolate); } @@ -1529,7 +1529,7 @@ static Handle SetGid(const Arguments& args) { return ThrowException(ErrnoException(errno, "setgid")); } - return Undefined(); + return Undefined(node_isolate); } @@ -1550,7 +1550,7 @@ static Handle SetUid(const Arguments& args) { return ThrowException(ErrnoException(errno, "setuid")); } - return Undefined(); + return Undefined(node_isolate); } @@ -1620,7 +1620,7 @@ static Handle SetGroups(const Arguments& args) { return ThrowException(ErrnoException(errno, "setgroups")); } - return Undefined(); + return Undefined(node_isolate); } @@ -1669,7 +1669,7 @@ static Handle InitGroups(const Arguments& args) { return ThrowException(ErrnoException(errno, "initgroups")); } - return Undefined(); + return Undefined(node_isolate); } #endif // __POSIX__ @@ -1678,7 +1678,7 @@ static Handle InitGroups(const Arguments& args) { v8::Handle Exit(const v8::Arguments& args) { HandleScope scope; exit(args[0]->IntegerValue()); - return Undefined(); + return Undefined(node_isolate); } @@ -1689,7 +1689,7 @@ static Handle Uptime(const Arguments& args) { uv_err_t err = uv_uptime(&uptime); if (err.code != UV_OK) { - return Undefined(); + return Undefined(node_isolate); } return scope.Close(Number::New(uptime - prog_start_time)); @@ -1747,7 +1747,7 @@ Handle Kill(const Arguments& args) { return scope.Close(Integer::New(-1, node_isolate)); } - return Undefined(); + return Undefined(node_isolate); } // used in Hrtime() below @@ -1873,7 +1873,7 @@ Handle DLOpen(const v8::Arguments& args) { // Tell coverity that 'handle' should not be freed when we return. // coverity[leaked_storage] - return Undefined(); + return Undefined(node_isolate); } @@ -2630,7 +2630,7 @@ Handle DebugProcess(const Arguments& args) { return ThrowException(ErrnoException(errno, "kill")); } - return Undefined(); + return Undefined(node_isolate); } #endif // __POSIX__ @@ -2703,7 +2703,7 @@ static int RegisterDebugSignalHandler() { static Handle DebugProcess(const Arguments& args) { HandleScope scope; - Handle rv = Undefined(); + Handle rv = Undefined(node_isolate); DWORD pid; HANDLE process = NULL; HANDLE thread = NULL; @@ -2787,14 +2787,14 @@ static Handle DebugProcess(const Arguments& args) { CloseHandle(mapping); } - return Undefined(); + return Undefined(node_isolate); } #endif // _WIN32 static Handle DebugPause(const Arguments& args) { v8::Debug::DebugBreak(node_isolate); - return Undefined(); + return Undefined(node_isolate); } @@ -2804,7 +2804,7 @@ static Handle DebugEnd(const Arguments& args) { debugger_running = false; } - return Undefined(); + return Undefined(node_isolate); } diff --git a/src/node_buffer.cc b/src/node_buffer.cc index a4d0532abac..ff7f451a3e8 100644 --- a/src/node_buffer.cc +++ b/src/node_buffer.cc @@ -384,7 +384,7 @@ Handle Buffer::Fill(const Arguments &args) { value, end - start); - return Undefined(); + return Undefined(node_isolate); } @@ -704,7 +704,7 @@ Handle Buffer::MakeFastBuffer(const Arguments &args) { kExternalUnsignedByteArray, length); - return Undefined(); + return Undefined(node_isolate); } diff --git a/src/node_counters.cc b/src/node_counters.cc index 3c8d49c00b4..9feb3644d2f 100644 --- a/src/node_counters.cc +++ b/src/node_counters.cc @@ -44,37 +44,37 @@ static uint64_t counter_gc_end_time; Handle COUNTER_NET_SERVER_CONNECTION(const Arguments& args) { NODE_COUNT_SERVER_CONN_OPEN(); - return Undefined(); + return Undefined(node_isolate); } Handle COUNTER_NET_SERVER_CONNECTION_CLOSE(const Arguments& args) { NODE_COUNT_SERVER_CONN_CLOSE(); - return Undefined(); + return Undefined(node_isolate); } Handle COUNTER_HTTP_SERVER_REQUEST(const Arguments& args) { NODE_COUNT_HTTP_SERVER_REQUEST(); - return Undefined(); + return Undefined(node_isolate); } Handle COUNTER_HTTP_SERVER_RESPONSE(const Arguments& args) { NODE_COUNT_HTTP_SERVER_RESPONSE(); - return Undefined(); + return Undefined(node_isolate); } Handle COUNTER_HTTP_CLIENT_REQUEST(const Arguments& args) { NODE_COUNT_HTTP_CLIENT_REQUEST(); - return Undefined(); + return Undefined(node_isolate); } Handle COUNTER_HTTP_CLIENT_RESPONSE(const Arguments& args) { NODE_COUNT_HTTP_CLIENT_RESPONSE(); - return Undefined(); + return Undefined(node_isolate); } diff --git a/src/node_crypto.cc b/src/node_crypto.cc index 0906f9bfa3d..9cbc577b52f 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -1481,7 +1481,7 @@ Handle Connection::GetPeerCertificate(const Arguments& args) { Connection *ss = Connection::Unwrap(args); - if (ss->ssl_ == NULL) return Undefined(); + if (ss->ssl_ == NULL) return Undefined(node_isolate); Local info = Object::New(); X509* peer_cert = SSL_get_peer_certificate(ss->ssl_); if (peer_cert != NULL) { @@ -1600,10 +1600,10 @@ Handle Connection::GetSession(const Arguments& args) { Connection *ss = Connection::Unwrap(args); - if (ss->ssl_ == NULL) return Undefined(); + if (ss->ssl_ == NULL) return Undefined(node_isolate); SSL_SESSION* sess = SSL_get_session(ss->ssl_); - if (!sess) return Undefined(); + if (!sess) return Undefined(node_isolate); int slen = i2d_SSL_SESSION(sess, NULL); assert(slen > 0); @@ -1650,7 +1650,7 @@ Handle Connection::SetSession(const Arguments& args) { delete [] sbuf; if (!sess) - return Undefined(); + return Undefined(node_isolate); int r = SSL_set_session(ss->ssl_, sess); SSL_SESSION_free(sess); @@ -1915,9 +1915,9 @@ Handle Connection::GetCurrentCipher(const Arguments& args) { OPENSSL_CONST SSL_CIPHER *c; - if ( ss->ssl_ == NULL ) return Undefined(); + if ( ss->ssl_ == NULL ) return Undefined(node_isolate); c = SSL_get_current_cipher(ss->ssl_); - if ( c == NULL ) return Undefined(); + if ( c == NULL ) return Undefined(node_isolate); Local info = Object::New(); const char* cipher_name = SSL_CIPHER_get_name(c); info->Set(name_symbol, String::New(cipher_name)); @@ -2251,7 +2251,7 @@ class Cipher : public ObjectWrap { cipher->SetAutoPadding(args.Length() < 1 || args[0]->BooleanValue()); - return Undefined(); + return Undefined(node_isolate); } static Handle CipherFinal(const Arguments& args) { @@ -2571,7 +2571,7 @@ class Decipher : public ObjectWrap { cipher->SetAutoPadding(args.Length() < 1 || args[0]->BooleanValue()); - return Undefined(); + return Undefined(node_isolate); } static Handle DecipherFinal(const Arguments& args) { @@ -3720,12 +3720,12 @@ void EIO_PBKDF2(uv_work_t* work_req) { void EIO_PBKDF2After(pbkdf2_req* req, Local argv[2]) { if (req->err) { - argv[0] = Local::New(node_isolate, Undefined()); + argv[0] = Local::New(node_isolate, Undefined(node_isolate)); argv[1] = Encode(req->key, req->keylen, BUFFER); memset(req->key, 0, req->keylen); } else { argv[0] = Exception::Error(String::New("PBKDF2 error")); - argv[1] = Local::New(node_isolate, Undefined()); + argv[1] = Local::New(node_isolate, Undefined(node_isolate)); } delete[] req->pass; @@ -3827,7 +3827,7 @@ Handle PBKDF2(const Arguments& args) { &req->work_req, EIO_PBKDF2, EIO_PBKDF2After); - return Undefined(); + return Undefined(node_isolate); } else { Local argv[2]; EIO_PBKDF2(req); diff --git a/src/node_dtrace.cc b/src/node_dtrace.cc index df42af2a977..e98b2824c30 100644 --- a/src/node_dtrace.cc +++ b/src/node_dtrace.cc @@ -129,7 +129,7 @@ using namespace v8; Handle DTRACE_NET_SERVER_CONNECTION(const Arguments& args) { #ifndef HAVE_SYSTEMTAP if (!NODE_NET_SERVER_CONNECTION_ENABLED()) - return Undefined(); + return Undefined(node_isolate); #endif HandleScope scope; @@ -142,13 +142,13 @@ Handle DTRACE_NET_SERVER_CONNECTION(const Arguments& args) { NODE_NET_SERVER_CONNECTION(&conn); #endif - return Undefined(); + return Undefined(node_isolate); } Handle DTRACE_NET_STREAM_END(const Arguments& args) { #ifndef HAVE_SYSTEMTAP if (!NODE_NET_STREAM_END_ENABLED()) - return Undefined(); + return Undefined(node_isolate); #endif HandleScope scope; @@ -160,13 +160,13 @@ Handle DTRACE_NET_STREAM_END(const Arguments& args) { NODE_NET_STREAM_END(&conn); #endif - return Undefined(); + return Undefined(node_isolate); } Handle DTRACE_NET_SOCKET_READ(const Arguments& args) { #ifndef HAVE_SYSTEMTAP if (!NODE_NET_SOCKET_READ_ENABLED()) - return Undefined(); + return Undefined(node_isolate); #endif HandleScope scope; @@ -184,13 +184,13 @@ Handle DTRACE_NET_SOCKET_READ(const Arguments& args) { NODE_NET_SOCKET_READ(&conn, nbytes); #endif - return Undefined(); + return Undefined(node_isolate); } Handle DTRACE_NET_SOCKET_WRITE(const Arguments& args) { #ifndef HAVE_SYSTEMTAP if (!NODE_NET_SOCKET_WRITE_ENABLED()) - return Undefined(); + return Undefined(node_isolate); #endif HandleScope scope; @@ -208,7 +208,7 @@ Handle DTRACE_NET_SOCKET_WRITE(const Arguments& args) { NODE_NET_SOCKET_WRITE(&conn, nbytes); #endif - return Undefined(); + return Undefined(node_isolate); } Handle DTRACE_HTTP_SERVER_REQUEST(const Arguments& args) { @@ -216,7 +216,7 @@ Handle DTRACE_HTTP_SERVER_REQUEST(const Arguments& args) { #ifndef HAVE_SYSTEMTAP if (!NODE_HTTP_SERVER_REQUEST_ENABLED()) - return Undefined(); + return Undefined(node_isolate); #endif HandleScope scope; @@ -249,13 +249,13 @@ Handle DTRACE_HTTP_SERVER_REQUEST(const Arguments& args) { #else NODE_HTTP_SERVER_REQUEST(&req, &conn); #endif - return Undefined(); + return Undefined(node_isolate); } Handle DTRACE_HTTP_SERVER_RESPONSE(const Arguments& args) { #ifndef HAVE_SYSTEMTAP if (!NODE_HTTP_SERVER_RESPONSE_ENABLED()) - return Undefined(); + return Undefined(node_isolate); #endif HandleScope scope; @@ -267,7 +267,7 @@ Handle DTRACE_HTTP_SERVER_RESPONSE(const Arguments& args) { NODE_HTTP_SERVER_RESPONSE(&conn); #endif - return Undefined(); + return Undefined(node_isolate); } Handle DTRACE_HTTP_CLIENT_REQUEST(const Arguments& args) { @@ -276,7 +276,7 @@ Handle DTRACE_HTTP_CLIENT_REQUEST(const Arguments& args) { #ifndef HAVE_SYSTEMTAP if (!NODE_HTTP_CLIENT_REQUEST_ENABLED()) - return Undefined(); + return Undefined(node_isolate); #endif HandleScope scope; @@ -312,13 +312,13 @@ Handle DTRACE_HTTP_CLIENT_REQUEST(const Arguments& args) { #else NODE_HTTP_CLIENT_REQUEST(&req, &conn); #endif - return Undefined(); + return Undefined(node_isolate); } Handle DTRACE_HTTP_CLIENT_RESPONSE(const Arguments& args) { #ifndef HAVE_SYSTEMTAP if (!NODE_HTTP_CLIENT_RESPONSE_ENABLED()) - return Undefined(); + return Undefined(node_isolate); #endif HandleScope scope; @@ -329,7 +329,7 @@ Handle DTRACE_HTTP_CLIENT_RESPONSE(const Arguments& args) { NODE_HTTP_CLIENT_RESPONSE(&conn); #endif - return Undefined(); + return Undefined(node_isolate); } #define NODE_PROBE(name) #name, name, Persistent() diff --git a/src/node_file.cc b/src/node_file.cc index 9673c98f070..3fd4c5af56a 100644 --- a/src/node_file.cc +++ b/src/node_file.cc @@ -256,7 +256,7 @@ static Handle Close(const Arguments& args) { ASYNC_CALL(close, args[1], fd) } else { SYNC_CALL(close, 0, fd) - return Undefined(); + return Undefined(node_isolate); } } @@ -437,7 +437,7 @@ static Handle Symlink(const Arguments& args) { ASYNC_CALL(symlink, args[3], *dest, *path, flags) } else { SYNC_CALL(symlink, *path, *dest, *path, flags) - return Undefined(); + return Undefined(node_isolate); } } @@ -457,7 +457,7 @@ static Handle Link(const Arguments& args) { ASYNC_CALL(link, args[2], *orig_path, *new_path) } else { SYNC_CALL(link, *orig_path, *orig_path, *new_path) - return Undefined(); + return Undefined(node_isolate); } } @@ -493,7 +493,7 @@ static Handle Rename(const Arguments& args) { ASYNC_CALL(rename, args[2], *old_path, *new_path) } else { SYNC_CALL(rename, *old_path, *old_path, *new_path) - return Undefined(); + return Undefined(node_isolate); } } @@ -513,7 +513,7 @@ static Handle FTruncate(const Arguments& args) { ASYNC_CALL(ftruncate, args[2], fd, len) } else { SYNC_CALL(ftruncate, 0, fd, len) - return Undefined(); + return Undefined(node_isolate); } } @@ -530,7 +530,7 @@ static Handle Fdatasync(const Arguments& args) { ASYNC_CALL(fdatasync, args[1], fd) } else { SYNC_CALL(fdatasync, 0, fd) - return Undefined(); + return Undefined(node_isolate); } } @@ -547,7 +547,7 @@ static Handle Fsync(const Arguments& args) { ASYNC_CALL(fsync, args[1], fd) } else { SYNC_CALL(fsync, 0, fd) - return Undefined(); + return Undefined(node_isolate); } } @@ -563,7 +563,7 @@ static Handle Unlink(const Arguments& args) { ASYNC_CALL(unlink, args[1], *path) } else { SYNC_CALL(unlink, *path, *path) - return Undefined(); + return Undefined(node_isolate); } } @@ -579,7 +579,7 @@ static Handle RMDir(const Arguments& args) { ASYNC_CALL(rmdir, args[1], *path) } else { SYNC_CALL(rmdir, *path, *path) - return Undefined(); + return Undefined(node_isolate); } } @@ -597,7 +597,7 @@ static Handle MKDir(const Arguments& args) { ASYNC_CALL(mkdir, args[2], *path, mode) } else { SYNC_CALL(mkdir, *path, *path, mode) - return Undefined(); + return Undefined(node_isolate); } } @@ -792,7 +792,7 @@ static Handle Chmod(const Arguments& args) { ASYNC_CALL(chmod, args[2], *path, mode); } else { SYNC_CALL(chmod, *path, *path, mode); - return Undefined(); + return Undefined(node_isolate); } } @@ -813,7 +813,7 @@ static Handle FChmod(const Arguments& args) { ASYNC_CALL(fchmod, args[2], fd, mode); } else { SYNC_CALL(fchmod, 0, fd, mode); - return Undefined(); + return Undefined(node_isolate); } } @@ -840,7 +840,7 @@ static Handle Chown(const Arguments& args) { ASYNC_CALL(chown, args[3], *path, uid, gid); } else { SYNC_CALL(chown, *path, *path, uid, gid); - return Undefined(); + return Undefined(node_isolate); } } @@ -867,7 +867,7 @@ static Handle FChown(const Arguments& args) { ASYNC_CALL(fchown, args[3], fd, uid, gid); } else { SYNC_CALL(fchown, 0, fd, uid, gid); - return Undefined(); + return Undefined(node_isolate); } } @@ -891,7 +891,7 @@ static Handle UTimes(const Arguments& args) { ASYNC_CALL(utime, args[3], *path, atime, mtime); } else { SYNC_CALL(utime, *path, *path, atime, mtime); - return Undefined(); + return Undefined(node_isolate); } } @@ -914,7 +914,7 @@ static Handle FUTimes(const Arguments& args) { ASYNC_CALL(futime, args[3], fd, atime, mtime); } else { SYNC_CALL(futime, 0, fd, atime, mtime); - return Undefined(); + return Undefined(node_isolate); } } diff --git a/src/node_http_parser.cc b/src/node_http_parser.cc index 3e622eb6aa8..07dabf95586 100644 --- a/src/node_http_parser.cc +++ b/src/node_http_parser.cc @@ -473,7 +473,7 @@ public: return scope.Close(e); } - return Undefined(); + return Undefined(node_isolate); } @@ -491,7 +491,7 @@ public: Parser* parser = ObjectWrap::Unwrap(args.This()); parser->Init(type); - return Undefined(); + return Undefined(node_isolate); } diff --git a/src/node_os.cc b/src/node_os.cc index 7b84c292783..2c61b0c5bf3 100644 --- a/src/node_os.cc +++ b/src/node_os.cc @@ -98,7 +98,7 @@ static Handle GetOSRelease(const Arguments& args) { info.dwOSVersionInfoSize = sizeof(info); if (GetVersionEx(&info) == 0) { - return Undefined(); + return Undefined(node_isolate); } sprintf(release, "%d.%d.%d", static_cast(info.dwMajorVersion), @@ -116,7 +116,7 @@ static Handle GetCPUInfo(const Arguments& args) { uv_err_t err = uv_cpu_info(&cpu_infos, &count); if (err.code != UV_OK) { - return Undefined(); + return Undefined(node_isolate); } Local cpus = Array::New(); @@ -152,7 +152,7 @@ static Handle GetFreeMemory(const Arguments& args) { double amount = uv_get_free_memory(); if (amount < 0) { - return Undefined(); + return Undefined(node_isolate); } return scope.Close(Number::New(amount)); @@ -163,7 +163,7 @@ static Handle GetTotalMemory(const Arguments& args) { double amount = uv_get_total_memory(); if (amount < 0) { - return Undefined(); + return Undefined(node_isolate); } return scope.Close(Number::New(amount)); @@ -176,7 +176,7 @@ static Handle GetUptime(const Arguments& args) { uv_err_t err = uv_uptime(&uptime); if (err.code != UV_OK) { - return Undefined(); + return Undefined(node_isolate); } return scope.Close(Number::New(uptime)); diff --git a/src/node_stat_watcher.cc b/src/node_stat_watcher.cc index 7e77c977cba..1f85b83ec3c 100644 --- a/src/node_stat_watcher.cc +++ b/src/node_stat_watcher.cc @@ -112,7 +112,7 @@ Handle StatWatcher::Start(const Arguments& args) { uv_fs_poll_start(wrap->watcher_, Callback, *path, interval); wrap->Ref(); - return Undefined(); + return Undefined(node_isolate); } @@ -124,7 +124,7 @@ Handle StatWatcher::Stop(const Arguments& args) { } MakeCallback(wrap->handle_, onstop_sym, 0, NULL); wrap->Stop(); - return Undefined(); + return Undefined(node_isolate); } diff --git a/src/node_zlib.cc b/src/node_zlib.cc index d4bcb95a8f5..fc7472061c3 100644 --- a/src/node_zlib.cc +++ b/src/node_zlib.cc @@ -93,7 +93,7 @@ class ZCtx : public ObjectWrap { HandleScope scope; ZCtx *ctx = ObjectWrap::Unwrap(args.This()); ctx->Close(); - return scope.Close(Undefined()); + return scope.Close(Undefined(node_isolate)); } @@ -333,7 +333,7 @@ class ZCtx : public ObjectWrap { Init(ctx, level, windowBits, memLevel, strategy, dictionary, dictionary_len); SetDictionary(ctx); - return Undefined(); + return Undefined(node_isolate); } static Handle Reset(const Arguments &args) { @@ -343,7 +343,7 @@ class ZCtx : public ObjectWrap { Reset(ctx); SetDictionary(ctx); - return Undefined(); + return Undefined(node_isolate); } static void Init(ZCtx *ctx, int level, int windowBits, int memLevel, diff --git a/src/tcp_wrap.cc b/src/tcp_wrap.cc index 690d73c5f3d..87a3e4d2625 100644 --- a/src/tcp_wrap.cc +++ b/src/tcp_wrap.cc @@ -209,7 +209,7 @@ Handle TCPWrap::SetNoDelay(const Arguments& args) { if (r) SetErrno(uv_last_error(uv_default_loop())); - return Undefined(); + return Undefined(node_isolate); } @@ -225,7 +225,7 @@ Handle TCPWrap::SetKeepAlive(const Arguments& args) { if (r) SetErrno(uv_last_error(uv_default_loop())); - return Undefined(); + return Undefined(node_isolate); } @@ -241,7 +241,7 @@ Handle TCPWrap::SetSimultaneousAccepts(const Arguments& args) { if (r) SetErrno(uv_last_error(uv_default_loop())); - return Undefined(); + return Undefined(node_isolate); } #endif diff --git a/src/tty_wrap.cc b/src/tty_wrap.cc index 476d0ab1571..17511050182 100644 --- a/src/tty_wrap.cc +++ b/src/tty_wrap.cc @@ -109,7 +109,7 @@ Handle TTYWrap::GuessHandleType(const Arguments& args) { default: assert(0); - return v8::Undefined(); + return v8::Undefined(node_isolate); } } @@ -137,7 +137,7 @@ Handle TTYWrap::GetWindowSize(const Arguments& args) { if (r) { SetErrno(uv_last_error(uv_default_loop())); - return v8::Undefined(); + return v8::Undefined(node_isolate); } Local a = v8::Array::New(2); diff --git a/src/v8_typed_array.cc b/src/v8_typed_array.cc index 9c370d69086..9b1aa442b7b 100644 --- a/src/v8_typed_array.cc +++ b/src/v8_typed_array.cc @@ -156,7 +156,9 @@ class ArrayBuffer { v8::Local buffer = ArrayBuffer::GetTemplate()-> GetFunction()->NewInstance(1, argv); - if (buffer.IsEmpty()) return v8::Undefined(); // constructor failed + if (buffer.IsEmpty()) { + return v8::Undefined(node_isolate); // constructor failed + } void* src = args.This()->GetAlignedPointerFromInternalField(0); void* dest = buffer->GetAlignedPointerFromInternalField(0); @@ -273,7 +275,9 @@ class TypedArray { v8::Integer::NewFromUnsigned(length * TBytes, node_isolate)}; buffer = ArrayBuffer::GetTemplate()-> GetFunction()->NewInstance(1, argv); - if (buffer.IsEmpty()) return v8::Undefined(); // constructor failed + if (buffer.IsEmpty()) { + return v8::Undefined(node_isolate); // constructor failed + } void* buf = buffer->GetAlignedPointerFromInternalField(0); args.This()->SetIndexedPropertiesToExternalArrayData( @@ -302,7 +306,9 @@ class TypedArray { buffer = ArrayBuffer::GetTemplate()-> GetFunction()->NewInstance(1, argv); - if (buffer.IsEmpty()) return v8::Undefined(); // constructor failed + if (buffer.IsEmpty()) { + return v8::Undefined(node_isolate); // constructor failed + } void* buf = buffer->GetAlignedPointerFromInternalField(0); args.This()->SetIndexedPropertiesToExternalArrayData( @@ -334,7 +340,7 @@ class TypedArray { if (args[0]->IsNumber()) return args.This()->Get(args[0]->Uint32Value()); - return v8::Undefined(); + return v8::Undefined(node_isolate); } static v8::Handle set(const v8::Arguments& args) { @@ -401,7 +407,7 @@ class TypedArray { } } - return v8::Undefined(); + return v8::Undefined(node_isolate); } static v8::Handle subarray(const v8::Arguments& args) { @@ -466,7 +472,7 @@ class Float64Array : public TypedArray<8, v8::kExternalDoubleArray> { }; template v8::Handle cTypeToValue(T) { - return v8::Undefined(); + return v8::Undefined(node_isolate); } template <> @@ -727,7 +733,7 @@ class DataView { void* ptr = args.This()->GetIndexedPropertiesExternalArrayData(); setValue(ptr, index, valueToCType(args[1]), !little_endian); - return v8::Undefined(); + return v8::Undefined(node_isolate); } static v8::Handle getUint8(const v8::Arguments& args) {