This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

src: pass node_isolate to Undefined()

  • Loading branch information...
bnoordhuis committed Jan 6, 2013
1 parent c7d7ae1 commit 7788a6bf85d9dd98eed3ad2cfaf1823fd6f8ae90
View
@@ -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);
View
@@ -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);
}
View
@@ -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);
}
View
@@ -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);
}
View
@@ -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);
}
View
@@ -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);
Oops, something went wrong.

0 comments on commit 7788a6b

Please sign in to comment.