Skip to content

Commit 7788a6b

Browse files
committed
src: pass node_isolate to Undefined()
1 parent c7d7ae1 commit 7788a6b

15 files changed

+103
-95
lines changed

src/fs_event_wrap.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,9 @@ Handle<Value> FSEventWrap::Close(const Arguments& args) {
175175
void* ptr = args.Holder()->GetAlignedPointerFromInternalField(0);
176176
FSEventWrap* wrap = static_cast<FSEventWrap*>(ptr);
177177

178-
if (wrap == NULL || wrap->initialized_ == false) return Undefined();
178+
if (wrap == NULL || wrap->initialized_ == false) {
179+
return Undefined(node_isolate);
180+
}
179181
wrap->initialized_ = false;
180182

181183
return HandleWrap::Close(args);

src/handle_wrap.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ Handle<Value> HandleWrap::Ref(const Arguments& args) {
6666
wrap->unref_ = false;
6767
}
6868

69-
return v8::Undefined();
69+
return v8::Undefined(node_isolate);
7070
}
7171

7272

@@ -80,7 +80,7 @@ Handle<Value> HandleWrap::Unref(const Arguments& args) {
8080
wrap->unref_ = true;
8181
}
8282

83-
return v8::Undefined();
83+
return v8::Undefined(node_isolate);
8484
}
8585

8686

src/node.cc

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ static void StartTickSpinner() {
205205

206206
static Handle<Value> NeedTickCallback(const Arguments& args) {
207207
StartTickSpinner();
208-
return Undefined();
208+
return Undefined(node_isolate);
209209
}
210210

211211

@@ -956,7 +956,7 @@ MakeCallback(const Handle<Object> object,
956956

957957
if (try_catch.HasCaught()) {
958958
FatalException(try_catch);
959-
return Undefined();
959+
return Undefined(node_isolate);
960960
}
961961

962962
return scope.Close(ret);
@@ -1312,7 +1312,7 @@ Handle<Value> GetActiveHandles(const Arguments& args) {
13121312

13131313
static Handle<Value> Abort(const Arguments& args) {
13141314
abort();
1315-
return Undefined();
1315+
return Undefined(node_isolate);
13161316
}
13171317

13181318

@@ -1331,7 +1331,7 @@ static Handle<Value> Chdir(const Arguments& args) {
13311331
return ThrowException(UVException(r.code, "uv_chdir"));
13321332
}
13331333

1334-
return Undefined();
1334+
return Undefined(node_isolate);
13351335
}
13361336

13371337

@@ -1529,7 +1529,7 @@ static Handle<Value> SetGid(const Arguments& args) {
15291529
return ThrowException(ErrnoException(errno, "setgid"));
15301530
}
15311531

1532-
return Undefined();
1532+
return Undefined(node_isolate);
15331533
}
15341534

15351535

@@ -1550,7 +1550,7 @@ static Handle<Value> SetUid(const Arguments& args) {
15501550
return ThrowException(ErrnoException(errno, "setuid"));
15511551
}
15521552

1553-
return Undefined();
1553+
return Undefined(node_isolate);
15541554
}
15551555

15561556

@@ -1620,7 +1620,7 @@ static Handle<Value> SetGroups(const Arguments& args) {
16201620
return ThrowException(ErrnoException(errno, "setgroups"));
16211621
}
16221622

1623-
return Undefined();
1623+
return Undefined(node_isolate);
16241624
}
16251625

16261626

@@ -1669,7 +1669,7 @@ static Handle<Value> InitGroups(const Arguments& args) {
16691669
return ThrowException(ErrnoException(errno, "initgroups"));
16701670
}
16711671

1672-
return Undefined();
1672+
return Undefined(node_isolate);
16731673
}
16741674

16751675
#endif // __POSIX__
@@ -1678,7 +1678,7 @@ static Handle<Value> InitGroups(const Arguments& args) {
16781678
v8::Handle<v8::Value> Exit(const v8::Arguments& args) {
16791679
HandleScope scope;
16801680
exit(args[0]->IntegerValue());
1681-
return Undefined();
1681+
return Undefined(node_isolate);
16821682
}
16831683

16841684

@@ -1689,7 +1689,7 @@ static Handle<Value> Uptime(const Arguments& args) {
16891689
uv_err_t err = uv_uptime(&uptime);
16901690

16911691
if (err.code != UV_OK) {
1692-
return Undefined();
1692+
return Undefined(node_isolate);
16931693
}
16941694

16951695
return scope.Close(Number::New(uptime - prog_start_time));
@@ -1747,7 +1747,7 @@ Handle<Value> Kill(const Arguments& args) {
17471747
return scope.Close(Integer::New(-1, node_isolate));
17481748
}
17491749

1750-
return Undefined();
1750+
return Undefined(node_isolate);
17511751
}
17521752

17531753
// used in Hrtime() below
@@ -1873,7 +1873,7 @@ Handle<Value> DLOpen(const v8::Arguments& args) {
18731873

18741874
// Tell coverity that 'handle' should not be freed when we return.
18751875
// coverity[leaked_storage]
1876-
return Undefined();
1876+
return Undefined(node_isolate);
18771877
}
18781878

18791879

@@ -2630,7 +2630,7 @@ Handle<Value> DebugProcess(const Arguments& args) {
26302630
return ThrowException(ErrnoException(errno, "kill"));
26312631
}
26322632

2633-
return Undefined();
2633+
return Undefined(node_isolate);
26342634
}
26352635
#endif // __POSIX__
26362636

@@ -2703,7 +2703,7 @@ static int RegisterDebugSignalHandler() {
27032703

27042704
static Handle<Value> DebugProcess(const Arguments& args) {
27052705
HandleScope scope;
2706-
Handle<Value> rv = Undefined();
2706+
Handle<Value> rv = Undefined(node_isolate);
27072707
DWORD pid;
27082708
HANDLE process = NULL;
27092709
HANDLE thread = NULL;
@@ -2787,14 +2787,14 @@ static Handle<Value> DebugProcess(const Arguments& args) {
27872787
CloseHandle(mapping);
27882788
}
27892789

2790-
return Undefined();
2790+
return Undefined(node_isolate);
27912791
}
27922792
#endif // _WIN32
27932793

27942794

27952795
static Handle<Value> DebugPause(const Arguments& args) {
27962796
v8::Debug::DebugBreak(node_isolate);
2797-
return Undefined();
2797+
return Undefined(node_isolate);
27982798
}
27992799

28002800

@@ -2804,7 +2804,7 @@ static Handle<Value> DebugEnd(const Arguments& args) {
28042804
debugger_running = false;
28052805
}
28062806

2807-
return Undefined();
2807+
return Undefined(node_isolate);
28082808
}
28092809

28102810

src/node_buffer.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ Handle<Value> Buffer::Fill(const Arguments &args) {
384384
value,
385385
end - start);
386386

387-
return Undefined();
387+
return Undefined(node_isolate);
388388
}
389389

390390

@@ -704,7 +704,7 @@ Handle<Value> Buffer::MakeFastBuffer(const Arguments &args) {
704704
kExternalUnsignedByteArray,
705705
length);
706706

707-
return Undefined();
707+
return Undefined(node_isolate);
708708
}
709709

710710

src/node_counters.cc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,37 +44,37 @@ static uint64_t counter_gc_end_time;
4444

4545
Handle<Value> COUNTER_NET_SERVER_CONNECTION(const Arguments& args) {
4646
NODE_COUNT_SERVER_CONN_OPEN();
47-
return Undefined();
47+
return Undefined(node_isolate);
4848
}
4949

5050

5151
Handle<Value> COUNTER_NET_SERVER_CONNECTION_CLOSE(const Arguments& args) {
5252
NODE_COUNT_SERVER_CONN_CLOSE();
53-
return Undefined();
53+
return Undefined(node_isolate);
5454
}
5555

5656

5757
Handle<Value> COUNTER_HTTP_SERVER_REQUEST(const Arguments& args) {
5858
NODE_COUNT_HTTP_SERVER_REQUEST();
59-
return Undefined();
59+
return Undefined(node_isolate);
6060
}
6161

6262

6363
Handle<Value> COUNTER_HTTP_SERVER_RESPONSE(const Arguments& args) {
6464
NODE_COUNT_HTTP_SERVER_RESPONSE();
65-
return Undefined();
65+
return Undefined(node_isolate);
6666
}
6767

6868

6969
Handle<Value> COUNTER_HTTP_CLIENT_REQUEST(const Arguments& args) {
7070
NODE_COUNT_HTTP_CLIENT_REQUEST();
71-
return Undefined();
71+
return Undefined(node_isolate);
7272
}
7373

7474

7575
Handle<Value> COUNTER_HTTP_CLIENT_RESPONSE(const Arguments& args) {
7676
NODE_COUNT_HTTP_CLIENT_RESPONSE();
77-
return Undefined();
77+
return Undefined(node_isolate);
7878
}
7979

8080

src/node_crypto.cc

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1481,7 +1481,7 @@ Handle<Value> Connection::GetPeerCertificate(const Arguments& args) {
14811481

14821482
Connection *ss = Connection::Unwrap(args);
14831483

1484-
if (ss->ssl_ == NULL) return Undefined();
1484+
if (ss->ssl_ == NULL) return Undefined(node_isolate);
14851485
Local<Object> info = Object::New();
14861486
X509* peer_cert = SSL_get_peer_certificate(ss->ssl_);
14871487
if (peer_cert != NULL) {
@@ -1600,10 +1600,10 @@ Handle<Value> Connection::GetSession(const Arguments& args) {
16001600

16011601
Connection *ss = Connection::Unwrap(args);
16021602

1603-
if (ss->ssl_ == NULL) return Undefined();
1603+
if (ss->ssl_ == NULL) return Undefined(node_isolate);
16041604

16051605
SSL_SESSION* sess = SSL_get_session(ss->ssl_);
1606-
if (!sess) return Undefined();
1606+
if (!sess) return Undefined(node_isolate);
16071607

16081608
int slen = i2d_SSL_SESSION(sess, NULL);
16091609
assert(slen > 0);
@@ -1650,7 +1650,7 @@ Handle<Value> Connection::SetSession(const Arguments& args) {
16501650
delete [] sbuf;
16511651

16521652
if (!sess)
1653-
return Undefined();
1653+
return Undefined(node_isolate);
16541654

16551655
int r = SSL_set_session(ss->ssl_, sess);
16561656
SSL_SESSION_free(sess);
@@ -1915,9 +1915,9 @@ Handle<Value> Connection::GetCurrentCipher(const Arguments& args) {
19151915

19161916
OPENSSL_CONST SSL_CIPHER *c;
19171917

1918-
if ( ss->ssl_ == NULL ) return Undefined();
1918+
if ( ss->ssl_ == NULL ) return Undefined(node_isolate);
19191919
c = SSL_get_current_cipher(ss->ssl_);
1920-
if ( c == NULL ) return Undefined();
1920+
if ( c == NULL ) return Undefined(node_isolate);
19211921
Local<Object> info = Object::New();
19221922
const char* cipher_name = SSL_CIPHER_get_name(c);
19231923
info->Set(name_symbol, String::New(cipher_name));
@@ -2251,7 +2251,7 @@ class Cipher : public ObjectWrap {
22512251

22522252
cipher->SetAutoPadding(args.Length() < 1 || args[0]->BooleanValue());
22532253

2254-
return Undefined();
2254+
return Undefined(node_isolate);
22552255
}
22562256

22572257
static Handle<Value> CipherFinal(const Arguments& args) {
@@ -2571,7 +2571,7 @@ class Decipher : public ObjectWrap {
25712571

25722572
cipher->SetAutoPadding(args.Length() < 1 || args[0]->BooleanValue());
25732573

2574-
return Undefined();
2574+
return Undefined(node_isolate);
25752575
}
25762576

25772577
static Handle<Value> DecipherFinal(const Arguments& args) {
@@ -3720,12 +3720,12 @@ void EIO_PBKDF2(uv_work_t* work_req) {
37203720

37213721
void EIO_PBKDF2After(pbkdf2_req* req, Local<Value> argv[2]) {
37223722
if (req->err) {
3723-
argv[0] = Local<Value>::New(node_isolate, Undefined());
3723+
argv[0] = Local<Value>::New(node_isolate, Undefined(node_isolate));
37243724
argv[1] = Encode(req->key, req->keylen, BUFFER);
37253725
memset(req->key, 0, req->keylen);
37263726
} else {
37273727
argv[0] = Exception::Error(String::New("PBKDF2 error"));
3728-
argv[1] = Local<Value>::New(node_isolate, Undefined());
3728+
argv[1] = Local<Value>::New(node_isolate, Undefined(node_isolate));
37293729
}
37303730

37313731
delete[] req->pass;
@@ -3827,7 +3827,7 @@ Handle<Value> PBKDF2(const Arguments& args) {
38273827
&req->work_req,
38283828
EIO_PBKDF2,
38293829
EIO_PBKDF2After);
3830-
return Undefined();
3830+
return Undefined(node_isolate);
38313831
} else {
38323832
Local<Value> argv[2];
38333833
EIO_PBKDF2(req);

0 commit comments

Comments
 (0)