src: pass node_isolate to Undefined()
This commit is contained in:
parent
c7d7ae1fe2
commit
7788a6bf85
@ -175,7 +175,9 @@ Handle<Value> FSEventWrap::Close(const Arguments& args) {
|
||||
void* ptr = args.Holder()->GetAlignedPointerFromInternalField(0);
|
||||
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;
|
||||
|
||||
return HandleWrap::Close(args);
|
||||
|
@ -66,7 +66,7 @@ Handle<Value> HandleWrap::Ref(const Arguments& args) {
|
||||
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;
|
||||
}
|
||||
|
||||
return v8::Undefined();
|
||||
return v8::Undefined(node_isolate);
|
||||
}
|
||||
|
||||
|
||||
|
34
src/node.cc
34
src/node.cc
@ -205,7 +205,7 @@ static void StartTickSpinner() {
|
||||
|
||||
static Handle<Value> NeedTickCallback(const Arguments& args) {
|
||||
StartTickSpinner();
|
||||
return Undefined();
|
||||
return Undefined(node_isolate);
|
||||
}
|
||||
|
||||
|
||||
@ -956,7 +956,7 @@ MakeCallback(const Handle<Object> object,
|
||||
|
||||
if (try_catch.HasCaught()) {
|
||||
FatalException(try_catch);
|
||||
return Undefined();
|
||||
return Undefined(node_isolate);
|
||||
}
|
||||
|
||||
return scope.Close(ret);
|
||||
@ -1312,7 +1312,7 @@ Handle<Value> GetActiveHandles(const Arguments& args) {
|
||||
|
||||
static Handle<Value> Abort(const Arguments& args) {
|
||||
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 Undefined();
|
||||
return Undefined(node_isolate);
|
||||
}
|
||||
|
||||
|
||||
@ -1529,7 +1529,7 @@ static Handle<Value> SetGid(const Arguments& args) {
|
||||
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 Undefined();
|
||||
return Undefined(node_isolate);
|
||||
}
|
||||
|
||||
|
||||
@ -1620,7 +1620,7 @@ static Handle<Value> SetGroups(const Arguments& args) {
|
||||
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 Undefined();
|
||||
return Undefined(node_isolate);
|
||||
}
|
||||
|
||||
#endif // __POSIX__
|
||||
@ -1678,7 +1678,7 @@ static Handle<Value> InitGroups(const Arguments& args) {
|
||||
v8::Handle<v8::Value> Exit(const v8::Arguments& args) {
|
||||
HandleScope scope;
|
||||
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);
|
||||
|
||||
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<Value> 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<Value> 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<Value> 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<Value> DebugProcess(const Arguments& args) {
|
||||
HandleScope scope;
|
||||
Handle<Value> rv = Undefined();
|
||||
Handle<Value> rv = Undefined(node_isolate);
|
||||
DWORD pid;
|
||||
HANDLE process = NULL;
|
||||
HANDLE thread = NULL;
|
||||
@ -2787,14 +2787,14 @@ static Handle<Value> DebugProcess(const Arguments& args) {
|
||||
CloseHandle(mapping);
|
||||
}
|
||||
|
||||
return Undefined();
|
||||
return Undefined(node_isolate);
|
||||
}
|
||||
#endif // _WIN32
|
||||
|
||||
|
||||
static Handle<Value> DebugPause(const Arguments& args) {
|
||||
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;
|
||||
}
|
||||
|
||||
return Undefined();
|
||||
return Undefined(node_isolate);
|
||||
}
|
||||
|
||||
|
||||
|
@ -384,7 +384,7 @@ Handle<Value> Buffer::Fill(const Arguments &args) {
|
||||
value,
|
||||
end - start);
|
||||
|
||||
return Undefined();
|
||||
return Undefined(node_isolate);
|
||||
}
|
||||
|
||||
|
||||
@ -704,7 +704,7 @@ Handle<Value> Buffer::MakeFastBuffer(const Arguments &args) {
|
||||
kExternalUnsignedByteArray,
|
||||
length);
|
||||
|
||||
return Undefined();
|
||||
return Undefined(node_isolate);
|
||||
}
|
||||
|
||||
|
||||
|
@ -44,37 +44,37 @@ static uint64_t counter_gc_end_time;
|
||||
|
||||
Handle<Value> COUNTER_NET_SERVER_CONNECTION(const Arguments& args) {
|
||||
NODE_COUNT_SERVER_CONN_OPEN();
|
||||
return Undefined();
|
||||
return Undefined(node_isolate);
|
||||
}
|
||||
|
||||
|
||||
Handle<Value> COUNTER_NET_SERVER_CONNECTION_CLOSE(const Arguments& args) {
|
||||
NODE_COUNT_SERVER_CONN_CLOSE();
|
||||
return Undefined();
|
||||
return Undefined(node_isolate);
|
||||
}
|
||||
|
||||
|
||||
Handle<Value> COUNTER_HTTP_SERVER_REQUEST(const Arguments& args) {
|
||||
NODE_COUNT_HTTP_SERVER_REQUEST();
|
||||
return Undefined();
|
||||
return Undefined(node_isolate);
|
||||
}
|
||||
|
||||
|
||||
Handle<Value> COUNTER_HTTP_SERVER_RESPONSE(const Arguments& args) {
|
||||
NODE_COUNT_HTTP_SERVER_RESPONSE();
|
||||
return Undefined();
|
||||
return Undefined(node_isolate);
|
||||
}
|
||||
|
||||
|
||||
Handle<Value> COUNTER_HTTP_CLIENT_REQUEST(const Arguments& args) {
|
||||
NODE_COUNT_HTTP_CLIENT_REQUEST();
|
||||
return Undefined();
|
||||
return Undefined(node_isolate);
|
||||
}
|
||||
|
||||
|
||||
Handle<Value> COUNTER_HTTP_CLIENT_RESPONSE(const Arguments& args) {
|
||||
NODE_COUNT_HTTP_CLIENT_RESPONSE();
|
||||
return Undefined();
|
||||
return Undefined(node_isolate);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1481,7 +1481,7 @@ Handle<Value> 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<Object> info = Object::New();
|
||||
X509* peer_cert = SSL_get_peer_certificate(ss->ssl_);
|
||||
if (peer_cert != NULL) {
|
||||
@ -1600,10 +1600,10 @@ Handle<Value> 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<Value> 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<Value> 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<Object> 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<Value> 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<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]) {
|
||||
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);
|
||||
memset(req->key, 0, req->keylen);
|
||||
} else {
|
||||
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;
|
||||
@ -3827,7 +3827,7 @@ Handle<Value> PBKDF2(const Arguments& args) {
|
||||
&req->work_req,
|
||||
EIO_PBKDF2,
|
||||
EIO_PBKDF2After);
|
||||
return Undefined();
|
||||
return Undefined(node_isolate);
|
||||
} else {
|
||||
Local<Value> argv[2];
|
||||
EIO_PBKDF2(req);
|
||||
|
@ -129,7 +129,7 @@ using namespace v8;
|
||||
Handle<Value> 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<Value> DTRACE_NET_SERVER_CONNECTION(const Arguments& args) {
|
||||
NODE_NET_SERVER_CONNECTION(&conn);
|
||||
#endif
|
||||
|
||||
return Undefined();
|
||||
return Undefined(node_isolate);
|
||||
}
|
||||
|
||||
Handle<Value> 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<Value> DTRACE_NET_STREAM_END(const Arguments& args) {
|
||||
NODE_NET_STREAM_END(&conn);
|
||||
#endif
|
||||
|
||||
return Undefined();
|
||||
return Undefined(node_isolate);
|
||||
}
|
||||
|
||||
Handle<Value> 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<Value> DTRACE_NET_SOCKET_READ(const Arguments& args) {
|
||||
NODE_NET_SOCKET_READ(&conn, nbytes);
|
||||
#endif
|
||||
|
||||
return Undefined();
|
||||
return Undefined(node_isolate);
|
||||
}
|
||||
|
||||
Handle<Value> 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<Value> DTRACE_NET_SOCKET_WRITE(const Arguments& args) {
|
||||
NODE_NET_SOCKET_WRITE(&conn, nbytes);
|
||||
#endif
|
||||
|
||||
return Undefined();
|
||||
return Undefined(node_isolate);
|
||||
}
|
||||
|
||||
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
|
||||
if (!NODE_HTTP_SERVER_REQUEST_ENABLED())
|
||||
return Undefined();
|
||||
return Undefined(node_isolate);
|
||||
#endif
|
||||
|
||||
HandleScope scope;
|
||||
@ -249,13 +249,13 @@ Handle<Value> DTRACE_HTTP_SERVER_REQUEST(const Arguments& args) {
|
||||
#else
|
||||
NODE_HTTP_SERVER_REQUEST(&req, &conn);
|
||||
#endif
|
||||
return Undefined();
|
||||
return Undefined(node_isolate);
|
||||
}
|
||||
|
||||
Handle<Value> 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<Value> DTRACE_HTTP_SERVER_RESPONSE(const Arguments& args) {
|
||||
NODE_HTTP_SERVER_RESPONSE(&conn);
|
||||
#endif
|
||||
|
||||
return Undefined();
|
||||
return Undefined(node_isolate);
|
||||
}
|
||||
|
||||
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
|
||||
if (!NODE_HTTP_CLIENT_REQUEST_ENABLED())
|
||||
return Undefined();
|
||||
return Undefined(node_isolate);
|
||||
#endif
|
||||
|
||||
HandleScope scope;
|
||||
@ -312,13 +312,13 @@ Handle<Value> DTRACE_HTTP_CLIENT_REQUEST(const Arguments& args) {
|
||||
#else
|
||||
NODE_HTTP_CLIENT_REQUEST(&req, &conn);
|
||||
#endif
|
||||
return Undefined();
|
||||
return Undefined(node_isolate);
|
||||
}
|
||||
|
||||
Handle<Value> 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<Value> 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<FunctionTemplate>()
|
||||
|
@ -256,7 +256,7 @@ static Handle<Value> 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<Value> 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<Value> 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<Value> 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<Value> 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<Value> 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<Value> 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<Value> 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<Value> 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<Value> 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<Value> 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<Value> 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<Value> 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<Value> 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<Value> 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<Value> 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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -473,7 +473,7 @@ public:
|
||||
return scope.Close(e);
|
||||
}
|
||||
|
||||
return Undefined();
|
||||
return Undefined(node_isolate);
|
||||
}
|
||||
|
||||
|
||||
@ -491,7 +491,7 @@ public:
|
||||
Parser* parser = ObjectWrap::Unwrap<Parser>(args.This());
|
||||
parser->Init(type);
|
||||
|
||||
return Undefined();
|
||||
return Undefined(node_isolate);
|
||||
}
|
||||
|
||||
|
||||
|
@ -98,7 +98,7 @@ static Handle<Value> 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<int>(info.dwMajorVersion),
|
||||
@ -116,7 +116,7 @@ static Handle<Value> 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<Array> cpus = Array::New();
|
||||
@ -152,7 +152,7 @@ static Handle<Value> 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<Value> 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<Value> 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));
|
||||
|
@ -112,7 +112,7 @@ Handle<Value> 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<Value> StatWatcher::Stop(const Arguments& args) {
|
||||
}
|
||||
MakeCallback(wrap->handle_, onstop_sym, 0, NULL);
|
||||
wrap->Stop();
|
||||
return Undefined();
|
||||
return Undefined(node_isolate);
|
||||
}
|
||||
|
||||
|
||||
|
@ -93,7 +93,7 @@ class ZCtx : public ObjectWrap {
|
||||
HandleScope scope;
|
||||
ZCtx *ctx = ObjectWrap::Unwrap<ZCtx>(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<Value> 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,
|
||||
|
@ -209,7 +209,7 @@ Handle<Value> 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<Value> 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<Value> TCPWrap::SetSimultaneousAccepts(const Arguments& args) {
|
||||
if (r)
|
||||
SetErrno(uv_last_error(uv_default_loop()));
|
||||
|
||||
return Undefined();
|
||||
return Undefined(node_isolate);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -109,7 +109,7 @@ Handle<Value> TTYWrap::GuessHandleType(const Arguments& args) {
|
||||
|
||||
default:
|
||||
assert(0);
|
||||
return v8::Undefined();
|
||||
return v8::Undefined(node_isolate);
|
||||
}
|
||||
}
|
||||
|
||||
@ -137,7 +137,7 @@ Handle<Value> TTYWrap::GetWindowSize(const Arguments& args) {
|
||||
|
||||
if (r) {
|
||||
SetErrno(uv_last_error(uv_default_loop()));
|
||||
return v8::Undefined();
|
||||
return v8::Undefined(node_isolate);
|
||||
}
|
||||
|
||||
Local<v8::Array> a = v8::Array::New(2);
|
||||
|
@ -156,7 +156,9 @@ class ArrayBuffer {
|
||||
v8::Local<v8::Object> 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<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) {
|
||||
@ -466,7 +472,7 @@ class Float64Array : public TypedArray<8, v8::kExternalDoubleArray> { };
|
||||
|
||||
template <typename T>
|
||||
v8::Handle<v8::Value> cTypeToValue(T) {
|
||||
return v8::Undefined();
|
||||
return v8::Undefined(node_isolate);
|
||||
}
|
||||
|
||||
template <>
|
||||
@ -727,7 +733,7 @@ class DataView {
|
||||
|
||||
void* ptr = args.This()->GetIndexedPropertiesExternalArrayData();
|
||||
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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user