Browse Source

src: pass node_isolate to Undefined()

v0.9.6-release
Ben Noordhuis 12 years ago
parent
commit
7788a6bf85
  1. 4
      src/fs_event_wrap.cc
  2. 4
      src/handle_wrap.cc
  3. 34
      src/node.cc
  4. 4
      src/node_buffer.cc
  5. 12
      src/node_counters.cc
  6. 22
      src/node_crypto.cc
  7. 32
      src/node_dtrace.cc
  8. 32
      src/node_file.cc
  9. 4
      src/node_http_parser.cc
  10. 10
      src/node_os.cc
  11. 4
      src/node_stat_watcher.cc
  12. 6
      src/node_zlib.cc
  13. 6
      src/tcp_wrap.cc
  14. 4
      src/tty_wrap.cc
  15. 20
      src/v8_typed_array.cc

4
src/fs_event_wrap.cc

@ -175,7 +175,9 @@ Handle<Value> FSEventWrap::Close(const Arguments& args) {
void* ptr = args.Holder()->GetAlignedPointerFromInternalField(0); void* ptr = args.Holder()->GetAlignedPointerFromInternalField(0);
FSEventWrap* wrap = static_cast<FSEventWrap*>(ptr); FSEventWrap* wrap = static_cast<FSEventWrap*>(ptr);
if (wrap == NULL || wrap->initialized_ == false) return Undefined(); if (wrap == NULL || wrap->initialized_ == false) {
return Undefined(node_isolate);
}
wrap->initialized_ = false; wrap->initialized_ = false;
return HandleWrap::Close(args); return HandleWrap::Close(args);

4
src/handle_wrap.cc

@ -66,7 +66,7 @@ Handle<Value> HandleWrap::Ref(const Arguments& args) {
wrap->unref_ = false; wrap->unref_ = false;
} }
return v8::Undefined(); return v8::Undefined(node_isolate);
} }
@ -80,7 +80,7 @@ Handle<Value> HandleWrap::Unref(const Arguments& args) {
wrap->unref_ = true; wrap->unref_ = true;
} }
return v8::Undefined(); return v8::Undefined(node_isolate);
} }

34
src/node.cc

@ -205,7 +205,7 @@ static void StartTickSpinner() {
static Handle<Value> NeedTickCallback(const Arguments& args) { static Handle<Value> NeedTickCallback(const Arguments& args) {
StartTickSpinner(); StartTickSpinner();
return Undefined(); return Undefined(node_isolate);
} }
@ -956,7 +956,7 @@ MakeCallback(const Handle<Object> object,
if (try_catch.HasCaught()) { if (try_catch.HasCaught()) {
FatalException(try_catch); FatalException(try_catch);
return Undefined(); return Undefined(node_isolate);
} }
return scope.Close(ret); return scope.Close(ret);
@ -1312,7 +1312,7 @@ Handle<Value> GetActiveHandles(const Arguments& args) {
static Handle<Value> Abort(const Arguments& args) { static Handle<Value> Abort(const Arguments& args) {
abort(); abort();
return Undefined(); return Undefined(node_isolate);
} }
@ -1331,7 +1331,7 @@ static Handle<Value> Chdir(const Arguments& args) {
return ThrowException(UVException(r.code, "uv_chdir")); return ThrowException(UVException(r.code, "uv_chdir"));
} }
return Undefined(); return Undefined(node_isolate);
} }
@ -1529,7 +1529,7 @@ static Handle<Value> SetGid(const Arguments& args) {
return ThrowException(ErrnoException(errno, "setgid")); return ThrowException(ErrnoException(errno, "setgid"));
} }
return Undefined(); return Undefined(node_isolate);
} }
@ -1550,7 +1550,7 @@ static Handle<Value> SetUid(const Arguments& args) {
return ThrowException(ErrnoException(errno, "setuid")); return ThrowException(ErrnoException(errno, "setuid"));
} }
return Undefined(); return Undefined(node_isolate);
} }
@ -1620,7 +1620,7 @@ static Handle<Value> SetGroups(const Arguments& args) {
return ThrowException(ErrnoException(errno, "setgroups")); return ThrowException(ErrnoException(errno, "setgroups"));
} }
return Undefined(); return Undefined(node_isolate);
} }
@ -1669,7 +1669,7 @@ static Handle<Value> InitGroups(const Arguments& args) {
return ThrowException(ErrnoException(errno, "initgroups")); return ThrowException(ErrnoException(errno, "initgroups"));
} }
return Undefined(); return Undefined(node_isolate);
} }
#endif // __POSIX__ #endif // __POSIX__
@ -1678,7 +1678,7 @@ static Handle<Value> InitGroups(const Arguments& args) {
v8::Handle<v8::Value> Exit(const v8::Arguments& args) { v8::Handle<v8::Value> Exit(const v8::Arguments& args) {
HandleScope scope; HandleScope scope;
exit(args[0]->IntegerValue()); exit(args[0]->IntegerValue());
return Undefined(); return Undefined(node_isolate);
} }
@ -1689,7 +1689,7 @@ static Handle<Value> Uptime(const Arguments& args) {
uv_err_t err = uv_uptime(&uptime); uv_err_t err = uv_uptime(&uptime);
if (err.code != UV_OK) { if (err.code != UV_OK) {
return Undefined(); return Undefined(node_isolate);
} }
return scope.Close(Number::New(uptime - prog_start_time)); return scope.Close(Number::New(uptime - prog_start_time));
@ -1747,7 +1747,7 @@ Handle<Value> Kill(const Arguments& args) {
return scope.Close(Integer::New(-1, node_isolate)); return scope.Close(Integer::New(-1, node_isolate));
} }
return Undefined(); return Undefined(node_isolate);
} }
// used in Hrtime() below // used in Hrtime() below
@ -1873,7 +1873,7 @@ Handle<Value> DLOpen(const v8::Arguments& args) {
// Tell coverity that 'handle' should not be freed when we return. // Tell coverity that 'handle' should not be freed when we return.
// coverity[leaked_storage] // coverity[leaked_storage]
return Undefined(); return Undefined(node_isolate);
} }
@ -2630,7 +2630,7 @@ Handle<Value> DebugProcess(const Arguments& args) {
return ThrowException(ErrnoException(errno, "kill")); return ThrowException(ErrnoException(errno, "kill"));
} }
return Undefined(); return Undefined(node_isolate);
} }
#endif // __POSIX__ #endif // __POSIX__
@ -2703,7 +2703,7 @@ static int RegisterDebugSignalHandler() {
static Handle<Value> DebugProcess(const Arguments& args) { static Handle<Value> DebugProcess(const Arguments& args) {
HandleScope scope; HandleScope scope;
Handle<Value> rv = Undefined(); Handle<Value> rv = Undefined(node_isolate);
DWORD pid; DWORD pid;
HANDLE process = NULL; HANDLE process = NULL;
HANDLE thread = NULL; HANDLE thread = NULL;
@ -2787,14 +2787,14 @@ static Handle<Value> DebugProcess(const Arguments& args) {
CloseHandle(mapping); CloseHandle(mapping);
} }
return Undefined(); return Undefined(node_isolate);
} }
#endif // _WIN32 #endif // _WIN32
static Handle<Value> DebugPause(const Arguments& args) { static Handle<Value> DebugPause(const Arguments& args) {
v8::Debug::DebugBreak(node_isolate); v8::Debug::DebugBreak(node_isolate);
return Undefined(); return Undefined(node_isolate);
} }
@ -2804,7 +2804,7 @@ static Handle<Value> DebugEnd(const Arguments& args) {
debugger_running = false; debugger_running = false;
} }
return Undefined(); return Undefined(node_isolate);
} }

4
src/node_buffer.cc

@ -384,7 +384,7 @@ Handle<Value> Buffer::Fill(const Arguments &args) {
value, value,
end - start); end - start);
return Undefined(); return Undefined(node_isolate);
} }
@ -704,7 +704,7 @@ Handle<Value> Buffer::MakeFastBuffer(const Arguments &args) {
kExternalUnsignedByteArray, kExternalUnsignedByteArray,
length); length);
return Undefined(); return Undefined(node_isolate);
} }

12
src/node_counters.cc

@ -44,37 +44,37 @@ static uint64_t counter_gc_end_time;
Handle<Value> COUNTER_NET_SERVER_CONNECTION(const Arguments& args) { Handle<Value> COUNTER_NET_SERVER_CONNECTION(const Arguments& args) {
NODE_COUNT_SERVER_CONN_OPEN(); NODE_COUNT_SERVER_CONN_OPEN();
return Undefined(); return Undefined(node_isolate);
} }
Handle<Value> COUNTER_NET_SERVER_CONNECTION_CLOSE(const Arguments& args) { Handle<Value> COUNTER_NET_SERVER_CONNECTION_CLOSE(const Arguments& args) {
NODE_COUNT_SERVER_CONN_CLOSE(); NODE_COUNT_SERVER_CONN_CLOSE();
return Undefined(); return Undefined(node_isolate);
} }
Handle<Value> COUNTER_HTTP_SERVER_REQUEST(const Arguments& args) { Handle<Value> COUNTER_HTTP_SERVER_REQUEST(const Arguments& args) {
NODE_COUNT_HTTP_SERVER_REQUEST(); NODE_COUNT_HTTP_SERVER_REQUEST();
return Undefined(); return Undefined(node_isolate);
} }
Handle<Value> COUNTER_HTTP_SERVER_RESPONSE(const Arguments& args) { Handle<Value> COUNTER_HTTP_SERVER_RESPONSE(const Arguments& args) {
NODE_COUNT_HTTP_SERVER_RESPONSE(); NODE_COUNT_HTTP_SERVER_RESPONSE();
return Undefined(); return Undefined(node_isolate);
} }
Handle<Value> COUNTER_HTTP_CLIENT_REQUEST(const Arguments& args) { Handle<Value> COUNTER_HTTP_CLIENT_REQUEST(const Arguments& args) {
NODE_COUNT_HTTP_CLIENT_REQUEST(); NODE_COUNT_HTTP_CLIENT_REQUEST();
return Undefined(); return Undefined(node_isolate);
} }
Handle<Value> COUNTER_HTTP_CLIENT_RESPONSE(const Arguments& args) { Handle<Value> COUNTER_HTTP_CLIENT_RESPONSE(const Arguments& args) {
NODE_COUNT_HTTP_CLIENT_RESPONSE(); NODE_COUNT_HTTP_CLIENT_RESPONSE();
return Undefined(); return Undefined(node_isolate);
} }

22
src/node_crypto.cc

@ -1481,7 +1481,7 @@ Handle<Value> Connection::GetPeerCertificate(const Arguments& args) {
Connection *ss = Connection::Unwrap(args); Connection *ss = Connection::Unwrap(args);
if (ss->ssl_ == NULL) return Undefined(); if (ss->ssl_ == NULL) return Undefined(node_isolate);
Local<Object> info = Object::New(); Local<Object> info = Object::New();
X509* peer_cert = SSL_get_peer_certificate(ss->ssl_); X509* peer_cert = SSL_get_peer_certificate(ss->ssl_);
if (peer_cert != NULL) { if (peer_cert != NULL) {
@ -1600,10 +1600,10 @@ Handle<Value> Connection::GetSession(const Arguments& args) {
Connection *ss = Connection::Unwrap(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_); 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); int slen = i2d_SSL_SESSION(sess, NULL);
assert(slen > 0); assert(slen > 0);
@ -1650,7 +1650,7 @@ Handle<Value> Connection::SetSession(const Arguments& args) {
delete [] sbuf; delete [] sbuf;
if (!sess) if (!sess)
return Undefined(); return Undefined(node_isolate);
int r = SSL_set_session(ss->ssl_, sess); int r = SSL_set_session(ss->ssl_, sess);
SSL_SESSION_free(sess); SSL_SESSION_free(sess);
@ -1915,9 +1915,9 @@ Handle<Value> Connection::GetCurrentCipher(const Arguments& args) {
OPENSSL_CONST SSL_CIPHER *c; 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_); c = SSL_get_current_cipher(ss->ssl_);
if ( c == NULL ) return Undefined(); if ( c == NULL ) return Undefined(node_isolate);
Local<Object> info = Object::New(); Local<Object> info = Object::New();
const char* cipher_name = SSL_CIPHER_get_name(c); const char* cipher_name = SSL_CIPHER_get_name(c);
info->Set(name_symbol, String::New(cipher_name)); info->Set(name_symbol, String::New(cipher_name));
@ -2251,7 +2251,7 @@ class Cipher : public ObjectWrap {
cipher->SetAutoPadding(args.Length() < 1 || args[0]->BooleanValue()); cipher->SetAutoPadding(args.Length() < 1 || args[0]->BooleanValue());
return Undefined(); return Undefined(node_isolate);
} }
static Handle<Value> CipherFinal(const Arguments& args) { static Handle<Value> CipherFinal(const Arguments& args) {
@ -2571,7 +2571,7 @@ class Decipher : public ObjectWrap {
cipher->SetAutoPadding(args.Length() < 1 || args[0]->BooleanValue()); cipher->SetAutoPadding(args.Length() < 1 || args[0]->BooleanValue());
return Undefined(); return Undefined(node_isolate);
} }
static Handle<Value> DecipherFinal(const Arguments& args) { static Handle<Value> DecipherFinal(const Arguments& args) {
@ -3720,12 +3720,12 @@ void EIO_PBKDF2(uv_work_t* work_req) {
void EIO_PBKDF2After(pbkdf2_req* req, Local<Value> argv[2]) { void EIO_PBKDF2After(pbkdf2_req* req, Local<Value> argv[2]) {
if (req->err) { if (req->err) {
argv[0] = Local<Value>::New(node_isolate, Undefined()); argv[0] = Local<Value>::New(node_isolate, Undefined(node_isolate));
argv[1] = Encode(req->key, req->keylen, BUFFER); argv[1] = Encode(req->key, req->keylen, BUFFER);
memset(req->key, 0, req->keylen); memset(req->key, 0, req->keylen);
} else { } else {
argv[0] = Exception::Error(String::New("PBKDF2 error")); argv[0] = Exception::Error(String::New("PBKDF2 error"));
argv[1] = Local<Value>::New(node_isolate, Undefined()); argv[1] = Local<Value>::New(node_isolate, Undefined(node_isolate));
} }
delete[] req->pass; delete[] req->pass;
@ -3827,7 +3827,7 @@ Handle<Value> PBKDF2(const Arguments& args) {
&req->work_req, &req->work_req,
EIO_PBKDF2, EIO_PBKDF2,
EIO_PBKDF2After); EIO_PBKDF2After);
return Undefined(); return Undefined(node_isolate);
} else { } else {
Local<Value> argv[2]; Local<Value> argv[2];
EIO_PBKDF2(req); EIO_PBKDF2(req);

32
src/node_dtrace.cc

@ -129,7 +129,7 @@ using namespace v8;
Handle<Value> DTRACE_NET_SERVER_CONNECTION(const Arguments& args) { Handle<Value> DTRACE_NET_SERVER_CONNECTION(const Arguments& args) {
#ifndef HAVE_SYSTEMTAP #ifndef HAVE_SYSTEMTAP
if (!NODE_NET_SERVER_CONNECTION_ENABLED()) if (!NODE_NET_SERVER_CONNECTION_ENABLED())
return Undefined(); return Undefined(node_isolate);
#endif #endif
HandleScope scope; HandleScope scope;
@ -142,13 +142,13 @@ Handle<Value> DTRACE_NET_SERVER_CONNECTION(const Arguments& args) {
NODE_NET_SERVER_CONNECTION(&conn); NODE_NET_SERVER_CONNECTION(&conn);
#endif #endif
return Undefined(); return Undefined(node_isolate);
} }
Handle<Value> DTRACE_NET_STREAM_END(const Arguments& args) { Handle<Value> DTRACE_NET_STREAM_END(const Arguments& args) {
#ifndef HAVE_SYSTEMTAP #ifndef HAVE_SYSTEMTAP
if (!NODE_NET_STREAM_END_ENABLED()) if (!NODE_NET_STREAM_END_ENABLED())
return Undefined(); return Undefined(node_isolate);
#endif #endif
HandleScope scope; HandleScope scope;
@ -160,13 +160,13 @@ Handle<Value> DTRACE_NET_STREAM_END(const Arguments& args) {
NODE_NET_STREAM_END(&conn); NODE_NET_STREAM_END(&conn);
#endif #endif
return Undefined(); return Undefined(node_isolate);
} }
Handle<Value> DTRACE_NET_SOCKET_READ(const Arguments& args) { Handle<Value> DTRACE_NET_SOCKET_READ(const Arguments& args) {
#ifndef HAVE_SYSTEMTAP #ifndef HAVE_SYSTEMTAP
if (!NODE_NET_SOCKET_READ_ENABLED()) if (!NODE_NET_SOCKET_READ_ENABLED())
return Undefined(); return Undefined(node_isolate);
#endif #endif
HandleScope scope; HandleScope scope;
@ -184,13 +184,13 @@ Handle<Value> DTRACE_NET_SOCKET_READ(const Arguments& args) {
NODE_NET_SOCKET_READ(&conn, nbytes); NODE_NET_SOCKET_READ(&conn, nbytes);
#endif #endif
return Undefined(); return Undefined(node_isolate);
} }
Handle<Value> DTRACE_NET_SOCKET_WRITE(const Arguments& args) { Handle<Value> DTRACE_NET_SOCKET_WRITE(const Arguments& args) {
#ifndef HAVE_SYSTEMTAP #ifndef HAVE_SYSTEMTAP
if (!NODE_NET_SOCKET_WRITE_ENABLED()) if (!NODE_NET_SOCKET_WRITE_ENABLED())
return Undefined(); return Undefined(node_isolate);
#endif #endif
HandleScope scope; HandleScope scope;
@ -208,7 +208,7 @@ Handle<Value> DTRACE_NET_SOCKET_WRITE(const Arguments& args) {
NODE_NET_SOCKET_WRITE(&conn, nbytes); NODE_NET_SOCKET_WRITE(&conn, nbytes);
#endif #endif
return Undefined(); return Undefined(node_isolate);
} }
Handle<Value> DTRACE_HTTP_SERVER_REQUEST(const Arguments& args) { Handle<Value> DTRACE_HTTP_SERVER_REQUEST(const Arguments& args) {
@ -216,7 +216,7 @@ Handle<Value> DTRACE_HTTP_SERVER_REQUEST(const Arguments& args) {
#ifndef HAVE_SYSTEMTAP #ifndef HAVE_SYSTEMTAP
if (!NODE_HTTP_SERVER_REQUEST_ENABLED()) if (!NODE_HTTP_SERVER_REQUEST_ENABLED())
return Undefined(); return Undefined(node_isolate);
#endif #endif
HandleScope scope; HandleScope scope;
@ -249,13 +249,13 @@ Handle<Value> DTRACE_HTTP_SERVER_REQUEST(const Arguments& args) {
#else #else
NODE_HTTP_SERVER_REQUEST(&req, &conn); NODE_HTTP_SERVER_REQUEST(&req, &conn);
#endif #endif
return Undefined(); return Undefined(node_isolate);
} }
Handle<Value> DTRACE_HTTP_SERVER_RESPONSE(const Arguments& args) { Handle<Value> DTRACE_HTTP_SERVER_RESPONSE(const Arguments& args) {
#ifndef HAVE_SYSTEMTAP #ifndef HAVE_SYSTEMTAP
if (!NODE_HTTP_SERVER_RESPONSE_ENABLED()) if (!NODE_HTTP_SERVER_RESPONSE_ENABLED())
return Undefined(); return Undefined(node_isolate);
#endif #endif
HandleScope scope; HandleScope scope;
@ -267,7 +267,7 @@ Handle<Value> DTRACE_HTTP_SERVER_RESPONSE(const Arguments& args) {
NODE_HTTP_SERVER_RESPONSE(&conn); NODE_HTTP_SERVER_RESPONSE(&conn);
#endif #endif
return Undefined(); return Undefined(node_isolate);
} }
Handle<Value> DTRACE_HTTP_CLIENT_REQUEST(const Arguments& args) { Handle<Value> DTRACE_HTTP_CLIENT_REQUEST(const Arguments& args) {
@ -276,7 +276,7 @@ Handle<Value> DTRACE_HTTP_CLIENT_REQUEST(const Arguments& args) {
#ifndef HAVE_SYSTEMTAP #ifndef HAVE_SYSTEMTAP
if (!NODE_HTTP_CLIENT_REQUEST_ENABLED()) if (!NODE_HTTP_CLIENT_REQUEST_ENABLED())
return Undefined(); return Undefined(node_isolate);
#endif #endif
HandleScope scope; HandleScope scope;
@ -312,13 +312,13 @@ Handle<Value> DTRACE_HTTP_CLIENT_REQUEST(const Arguments& args) {
#else #else
NODE_HTTP_CLIENT_REQUEST(&req, &conn); NODE_HTTP_CLIENT_REQUEST(&req, &conn);
#endif #endif
return Undefined(); return Undefined(node_isolate);
} }
Handle<Value> DTRACE_HTTP_CLIENT_RESPONSE(const Arguments& args) { Handle<Value> DTRACE_HTTP_CLIENT_RESPONSE(const Arguments& args) {
#ifndef HAVE_SYSTEMTAP #ifndef HAVE_SYSTEMTAP
if (!NODE_HTTP_CLIENT_RESPONSE_ENABLED()) if (!NODE_HTTP_CLIENT_RESPONSE_ENABLED())
return Undefined(); return Undefined(node_isolate);
#endif #endif
HandleScope scope; HandleScope scope;
@ -329,7 +329,7 @@ Handle<Value> DTRACE_HTTP_CLIENT_RESPONSE(const Arguments& args) {
NODE_HTTP_CLIENT_RESPONSE(&conn); NODE_HTTP_CLIENT_RESPONSE(&conn);
#endif #endif
return Undefined(); return Undefined(node_isolate);
} }
#define NODE_PROBE(name) #name, name, Persistent<FunctionTemplate>() #define NODE_PROBE(name) #name, name, Persistent<FunctionTemplate>()

32
src/node_file.cc

@ -256,7 +256,7 @@ static Handle<Value> Close(const Arguments& args) {
ASYNC_CALL(close, args[1], fd) ASYNC_CALL(close, args[1], fd)
} else { } else {
SYNC_CALL(close, 0, fd) SYNC_CALL(close, 0, fd)
return Undefined(); return Undefined(node_isolate);
} }
} }
@ -437,7 +437,7 @@ static Handle<Value> Symlink(const Arguments& args) {
ASYNC_CALL(symlink, args[3], *dest, *path, flags) ASYNC_CALL(symlink, args[3], *dest, *path, flags)
} else { } else {
SYNC_CALL(symlink, *path, *dest, *path, flags) SYNC_CALL(symlink, *path, *dest, *path, flags)
return Undefined(); return Undefined(node_isolate);
} }
} }
@ -457,7 +457,7 @@ static Handle<Value> Link(const Arguments& args) {
ASYNC_CALL(link, args[2], *orig_path, *new_path) ASYNC_CALL(link, args[2], *orig_path, *new_path)
} else { } else {
SYNC_CALL(link, *orig_path, *orig_path, *new_path) SYNC_CALL(link, *orig_path, *orig_path, *new_path)
return Undefined(); return Undefined(node_isolate);
} }
} }
@ -493,7 +493,7 @@ static Handle<Value> Rename(const Arguments& args) {
ASYNC_CALL(rename, args[2], *old_path, *new_path) ASYNC_CALL(rename, args[2], *old_path, *new_path)
} else { } else {
SYNC_CALL(rename, *old_path, *old_path, *new_path) SYNC_CALL(rename, *old_path, *old_path, *new_path)
return Undefined(); return Undefined(node_isolate);
} }
} }
@ -513,7 +513,7 @@ static Handle<Value> FTruncate(const Arguments& args) {
ASYNC_CALL(ftruncate, args[2], fd, len) ASYNC_CALL(ftruncate, args[2], fd, len)
} else { } else {
SYNC_CALL(ftruncate, 0, fd, len) SYNC_CALL(ftruncate, 0, fd, len)
return Undefined(); return Undefined(node_isolate);
} }
} }
@ -530,7 +530,7 @@ static Handle<Value> Fdatasync(const Arguments& args) {
ASYNC_CALL(fdatasync, args[1], fd) ASYNC_CALL(fdatasync, args[1], fd)
} else { } else {
SYNC_CALL(fdatasync, 0, fd) SYNC_CALL(fdatasync, 0, fd)
return Undefined(); return Undefined(node_isolate);
} }
} }
@ -547,7 +547,7 @@ static Handle<Value> Fsync(const Arguments& args) {
ASYNC_CALL(fsync, args[1], fd) ASYNC_CALL(fsync, args[1], fd)
} else { } else {
SYNC_CALL(fsync, 0, fd) SYNC_CALL(fsync, 0, fd)
return Undefined(); return Undefined(node_isolate);
} }
} }
@ -563,7 +563,7 @@ static Handle<Value> Unlink(const Arguments& args) {
ASYNC_CALL(unlink, args[1], *path) ASYNC_CALL(unlink, args[1], *path)
} else { } else {
SYNC_CALL(unlink, *path, *path) SYNC_CALL(unlink, *path, *path)
return Undefined(); return Undefined(node_isolate);
} }
} }
@ -579,7 +579,7 @@ static Handle<Value> RMDir(const Arguments& args) {
ASYNC_CALL(rmdir, args[1], *path) ASYNC_CALL(rmdir, args[1], *path)
} else { } else {
SYNC_CALL(rmdir, *path, *path) SYNC_CALL(rmdir, *path, *path)
return Undefined(); return Undefined(node_isolate);
} }
} }
@ -597,7 +597,7 @@ static Handle<Value> MKDir(const Arguments& args) {
ASYNC_CALL(mkdir, args[2], *path, mode) ASYNC_CALL(mkdir, args[2], *path, mode)
} else { } else {
SYNC_CALL(mkdir, *path, *path, mode) SYNC_CALL(mkdir, *path, *path, mode)
return Undefined(); return Undefined(node_isolate);
} }
} }
@ -792,7 +792,7 @@ static Handle<Value> Chmod(const Arguments& args) {
ASYNC_CALL(chmod, args[2], *path, mode); ASYNC_CALL(chmod, args[2], *path, mode);
} else { } else {
SYNC_CALL(chmod, *path, *path, mode); SYNC_CALL(chmod, *path, *path, mode);
return Undefined(); return Undefined(node_isolate);
} }
} }
@ -813,7 +813,7 @@ static Handle<Value> FChmod(const Arguments& args) {
ASYNC_CALL(fchmod, args[2], fd, mode); ASYNC_CALL(fchmod, args[2], fd, mode);
} else { } else {
SYNC_CALL(fchmod, 0, fd, mode); SYNC_CALL(fchmod, 0, fd, mode);
return Undefined(); return Undefined(node_isolate);
} }
} }
@ -840,7 +840,7 @@ static Handle<Value> Chown(const Arguments& args) {
ASYNC_CALL(chown, args[3], *path, uid, gid); ASYNC_CALL(chown, args[3], *path, uid, gid);
} else { } else {
SYNC_CALL(chown, *path, *path, uid, gid); SYNC_CALL(chown, *path, *path, uid, gid);
return Undefined(); return Undefined(node_isolate);
} }
} }
@ -867,7 +867,7 @@ static Handle<Value> FChown(const Arguments& args) {
ASYNC_CALL(fchown, args[3], fd, uid, gid); ASYNC_CALL(fchown, args[3], fd, uid, gid);
} else { } else {
SYNC_CALL(fchown, 0, fd, uid, gid); SYNC_CALL(fchown, 0, fd, uid, gid);
return Undefined(); return Undefined(node_isolate);
} }
} }
@ -891,7 +891,7 @@ static Handle<Value> UTimes(const Arguments& args) {
ASYNC_CALL(utime, args[3], *path, atime, mtime); ASYNC_CALL(utime, args[3], *path, atime, mtime);
} else { } else {
SYNC_CALL(utime, *path, *path, atime, mtime); SYNC_CALL(utime, *path, *path, atime, mtime);
return Undefined(); return Undefined(node_isolate);
} }
} }
@ -914,7 +914,7 @@ static Handle<Value> FUTimes(const Arguments& args) {
ASYNC_CALL(futime, args[3], fd, atime, mtime); ASYNC_CALL(futime, args[3], fd, atime, mtime);
} else { } else {
SYNC_CALL(futime, 0, fd, atime, mtime); SYNC_CALL(futime, 0, fd, atime, mtime);
return Undefined(); return Undefined(node_isolate);
} }
} }

4
src/node_http_parser.cc

@ -473,7 +473,7 @@ public:
return scope.Close(e); return scope.Close(e);
} }
return Undefined(); return Undefined(node_isolate);
} }
@ -491,7 +491,7 @@ public:
Parser* parser = ObjectWrap::Unwrap<Parser>(args.This()); Parser* parser = ObjectWrap::Unwrap<Parser>(args.This());
parser->Init(type); parser->Init(type);
return Undefined(); return Undefined(node_isolate);
} }

10
src/node_os.cc

@ -98,7 +98,7 @@ static Handle<Value> GetOSRelease(const Arguments& args) {
info.dwOSVersionInfoSize = sizeof(info); info.dwOSVersionInfoSize = sizeof(info);
if (GetVersionEx(&info) == 0) { if (GetVersionEx(&info) == 0) {
return Undefined(); return Undefined(node_isolate);
} }
sprintf(release, "%d.%d.%d", static_cast<int>(info.dwMajorVersion), sprintf(release, "%d.%d.%d", static_cast<int>(info.dwMajorVersion),
@ -116,7 +116,7 @@ static Handle<Value> GetCPUInfo(const Arguments& args) {
uv_err_t err = uv_cpu_info(&cpu_infos, &count); uv_err_t err = uv_cpu_info(&cpu_infos, &count);
if (err.code != UV_OK) { if (err.code != UV_OK) {
return Undefined(); return Undefined(node_isolate);
} }
Local<Array> cpus = Array::New(); Local<Array> cpus = Array::New();
@ -152,7 +152,7 @@ static Handle<Value> GetFreeMemory(const Arguments& args) {
double amount = uv_get_free_memory(); double amount = uv_get_free_memory();
if (amount < 0) { if (amount < 0) {
return Undefined(); return Undefined(node_isolate);
} }
return scope.Close(Number::New(amount)); return scope.Close(Number::New(amount));
@ -163,7 +163,7 @@ static Handle<Value> GetTotalMemory(const Arguments& args) {
double amount = uv_get_total_memory(); double amount = uv_get_total_memory();
if (amount < 0) { if (amount < 0) {
return Undefined(); return Undefined(node_isolate);
} }
return scope.Close(Number::New(amount)); return scope.Close(Number::New(amount));
@ -176,7 +176,7 @@ static Handle<Value> GetUptime(const Arguments& args) {
uv_err_t err = uv_uptime(&uptime); uv_err_t err = uv_uptime(&uptime);
if (err.code != UV_OK) { if (err.code != UV_OK) {
return Undefined(); return Undefined(node_isolate);
} }
return scope.Close(Number::New(uptime)); return scope.Close(Number::New(uptime));

4
src/node_stat_watcher.cc

@ -112,7 +112,7 @@ Handle<Value> StatWatcher::Start(const Arguments& args) {
uv_fs_poll_start(wrap->watcher_, Callback, *path, interval); uv_fs_poll_start(wrap->watcher_, Callback, *path, interval);
wrap->Ref(); wrap->Ref();
return Undefined(); return Undefined(node_isolate);
} }
@ -124,7 +124,7 @@ Handle<Value> StatWatcher::Stop(const Arguments& args) {
} }
MakeCallback(wrap->handle_, onstop_sym, 0, NULL); MakeCallback(wrap->handle_, onstop_sym, 0, NULL);
wrap->Stop(); wrap->Stop();
return Undefined(); return Undefined(node_isolate);
} }

6
src/node_zlib.cc

@ -93,7 +93,7 @@ class ZCtx : public ObjectWrap {
HandleScope scope; HandleScope scope;
ZCtx *ctx = ObjectWrap::Unwrap<ZCtx>(args.This()); ZCtx *ctx = ObjectWrap::Unwrap<ZCtx>(args.This());
ctx->Close(); 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, Init(ctx, level, windowBits, memLevel, strategy,
dictionary, dictionary_len); dictionary, dictionary_len);
SetDictionary(ctx); SetDictionary(ctx);
return Undefined(); return Undefined(node_isolate);
} }
static Handle<Value> Reset(const Arguments &args) { static Handle<Value> Reset(const Arguments &args) {
@ -343,7 +343,7 @@ class ZCtx : public ObjectWrap {
Reset(ctx); Reset(ctx);
SetDictionary(ctx); SetDictionary(ctx);
return Undefined(); return Undefined(node_isolate);
} }
static void Init(ZCtx *ctx, int level, int windowBits, int memLevel, static void Init(ZCtx *ctx, int level, int windowBits, int memLevel,

6
src/tcp_wrap.cc

@ -209,7 +209,7 @@ Handle<Value> TCPWrap::SetNoDelay(const Arguments& args) {
if (r) if (r)
SetErrno(uv_last_error(uv_default_loop())); SetErrno(uv_last_error(uv_default_loop()));
return Undefined(); return Undefined(node_isolate);
} }
@ -225,7 +225,7 @@ Handle<Value> TCPWrap::SetKeepAlive(const Arguments& args) {
if (r) if (r)
SetErrno(uv_last_error(uv_default_loop())); SetErrno(uv_last_error(uv_default_loop()));
return Undefined(); return Undefined(node_isolate);
} }
@ -241,7 +241,7 @@ Handle<Value> TCPWrap::SetSimultaneousAccepts(const Arguments& args) {
if (r) if (r)
SetErrno(uv_last_error(uv_default_loop())); SetErrno(uv_last_error(uv_default_loop()));
return Undefined(); return Undefined(node_isolate);
} }
#endif #endif

4
src/tty_wrap.cc

@ -109,7 +109,7 @@ Handle<Value> TTYWrap::GuessHandleType(const Arguments& args) {
default: default:
assert(0); assert(0);
return v8::Undefined(); return v8::Undefined(node_isolate);
} }
} }
@ -137,7 +137,7 @@ Handle<Value> TTYWrap::GetWindowSize(const Arguments& args) {
if (r) { if (r) {
SetErrno(uv_last_error(uv_default_loop())); SetErrno(uv_last_error(uv_default_loop()));
return v8::Undefined(); return v8::Undefined(node_isolate);
} }
Local<v8::Array> a = v8::Array::New(2); Local<v8::Array> a = v8::Array::New(2);

20
src/v8_typed_array.cc

@ -156,7 +156,9 @@ class ArrayBuffer {
v8::Local<v8::Object> buffer = ArrayBuffer::GetTemplate()-> v8::Local<v8::Object> buffer = ArrayBuffer::GetTemplate()->
GetFunction()->NewInstance(1, argv); 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* src = args.This()->GetAlignedPointerFromInternalField(0);
void* dest = buffer->GetAlignedPointerFromInternalField(0); void* dest = buffer->GetAlignedPointerFromInternalField(0);
@ -273,7 +275,9 @@ class TypedArray {
v8::Integer::NewFromUnsigned(length * TBytes, node_isolate)}; v8::Integer::NewFromUnsigned(length * TBytes, node_isolate)};
buffer = ArrayBuffer::GetTemplate()-> buffer = ArrayBuffer::GetTemplate()->
GetFunction()->NewInstance(1, argv); 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); void* buf = buffer->GetAlignedPointerFromInternalField(0);
args.This()->SetIndexedPropertiesToExternalArrayData( args.This()->SetIndexedPropertiesToExternalArrayData(
@ -302,7 +306,9 @@ class TypedArray {
buffer = ArrayBuffer::GetTemplate()-> buffer = ArrayBuffer::GetTemplate()->
GetFunction()->NewInstance(1, argv); 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); void* buf = buffer->GetAlignedPointerFromInternalField(0);
args.This()->SetIndexedPropertiesToExternalArrayData( args.This()->SetIndexedPropertiesToExternalArrayData(
@ -334,7 +340,7 @@ class TypedArray {
if (args[0]->IsNumber()) if (args[0]->IsNumber())
return args.This()->Get(args[0]->Uint32Value()); return args.This()->Get(args[0]->Uint32Value());
return v8::Undefined(); return v8::Undefined(node_isolate);
} }
static v8::Handle<v8::Value> set(const v8::Arguments& args) { static v8::Handle<v8::Value> set(const v8::Arguments& args) {
@ -401,7 +407,7 @@ class TypedArray {
} }
} }
return v8::Undefined(); return v8::Undefined(node_isolate);
} }
static v8::Handle<v8::Value> subarray(const v8::Arguments& args) { static v8::Handle<v8::Value> subarray(const v8::Arguments& args) {
@ -466,7 +472,7 @@ class Float64Array : public TypedArray<8, v8::kExternalDoubleArray> { };
template <typename T> template <typename T>
v8::Handle<v8::Value> cTypeToValue(T) { v8::Handle<v8::Value> cTypeToValue(T) {
return v8::Undefined(); return v8::Undefined(node_isolate);
} }
template <> template <>
@ -727,7 +733,7 @@ class DataView {
void* ptr = args.This()->GetIndexedPropertiesExternalArrayData(); void* ptr = args.This()->GetIndexedPropertiesExternalArrayData();
setValue<T>(ptr, index, valueToCType<T>(args[1]), !little_endian); setValue<T>(ptr, index, valueToCType<T>(args[1]), !little_endian);
return v8::Undefined(); return v8::Undefined(node_isolate);
} }
static v8::Handle<v8::Value> getUint8(const v8::Arguments& args) { static v8::Handle<v8::Value> getUint8(const v8::Arguments& args) {

Loading…
Cancel
Save