diff --git a/src/fs_event_wrap.cc b/src/fs_event_wrap.cc index 0df58c727f..78b7cf1c1d 100644 --- a/src/fs_event_wrap.cc +++ b/src/fs_event_wrap.cc @@ -171,9 +171,9 @@ Handle FSEventWrap::Close(const Arguments& args) { // Unwrap manually here. The UNWRAP() macro asserts that wrap != NULL. // That usually indicates an error but not here: double closes are possible // and legal, HandleWrap::Close() deals with them the same way. - assert(!args.Holder().IsEmpty()); - assert(args.Holder()->InternalFieldCount() > 0); - void* ptr = args.Holder()->GetAlignedPointerFromInternalField(0); + assert(!args.This().IsEmpty()); + assert(args.This()->InternalFieldCount() > 0); + void* ptr = args.This()->GetAlignedPointerFromInternalField(0); FSEventWrap* wrap = static_cast(ptr); if (wrap == NULL || wrap->initialized_ == false) { diff --git a/src/handle_wrap.cc b/src/handle_wrap.cc index 740e2b3aa2..07f19ad222 100644 --- a/src/handle_wrap.cc +++ b/src/handle_wrap.cc @@ -84,7 +84,7 @@ Handle HandleWrap::Close(const Arguments& args) { HandleScope scope(node_isolate); HandleWrap *wrap = static_cast( - args.Holder()->GetAlignedPointerFromInternalField(0)); + args.This()->GetAlignedPointerFromInternalField(0)); // guard against uninitialized handle or double close if (wrap == NULL || wrap->handle__ == NULL) { diff --git a/src/handle_wrap.h b/src/handle_wrap.h index 7c88a61d87..fcd9fb2cc7 100644 --- a/src/handle_wrap.h +++ b/src/handle_wrap.h @@ -47,10 +47,10 @@ namespace node { // taken care of. #define UNWRAP_NO_ABORT(type) \ - assert(!args.Holder().IsEmpty()); \ - assert(args.Holder()->InternalFieldCount() > 0); \ + assert(!args.This().IsEmpty()); \ + assert(args.This()->InternalFieldCount() > 0); \ type* wrap = static_cast( \ - args.Holder()->GetAlignedPointerFromInternalField(0)); + args.This()->GetAlignedPointerFromInternalField(0)); class HandleWrap { public: diff --git a/src/node_crypto.cc b/src/node_crypto.cc index 43926c8f6d..7858fbaadc 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -170,7 +170,7 @@ void SecureContext::Initialize(Handle target) { Handle SecureContext::New(const Arguments& args) { HandleScope scope(node_isolate); SecureContext *p = new SecureContext(); - p->Wrap(args.Holder()); + p->Wrap(args.This()); return args.This(); } @@ -178,7 +178,7 @@ Handle SecureContext::New(const Arguments& args) { Handle SecureContext::Init(const Arguments& args) { HandleScope scope(node_isolate); - SecureContext *sc = ObjectWrap::Unwrap(args.Holder()); + SecureContext *sc = ObjectWrap::Unwrap(args.This()); OPENSSL_CONST SSL_METHOD *method = SSLv23_method(); @@ -342,7 +342,7 @@ static X509* LoadX509 (Handle v) { Handle SecureContext::SetKey(const Arguments& args) { HandleScope scope(node_isolate); - SecureContext *sc = ObjectWrap::Unwrap(args.Holder()); + SecureContext *sc = ObjectWrap::Unwrap(args.This()); unsigned int len = args.Length(); if (len != 1 && len != 2) { @@ -447,7 +447,7 @@ end: Handle SecureContext::SetCert(const Arguments& args) { HandleScope scope(node_isolate); - SecureContext *sc = ObjectWrap::Unwrap(args.Holder()); + SecureContext *sc = ObjectWrap::Unwrap(args.This()); if (args.Length() != 1) { return ThrowException(Exception::TypeError( @@ -478,7 +478,7 @@ Handle SecureContext::AddCACert(const Arguments& args) { bool newCAStore = false; HandleScope scope(node_isolate); - SecureContext *sc = ObjectWrap::Unwrap(args.Holder()); + SecureContext *sc = ObjectWrap::Unwrap(args.This()); if (args.Length() != 1) { return ThrowException(Exception::TypeError(String::New("Bad parameter"))); @@ -508,7 +508,7 @@ Handle SecureContext::AddCACert(const Arguments& args) { Handle SecureContext::AddCRL(const Arguments& args) { HandleScope scope(node_isolate); - SecureContext *sc = ObjectWrap::Unwrap(args.Holder()); + SecureContext *sc = ObjectWrap::Unwrap(args.This()); if (args.Length() != 1) { return ThrowException(Exception::TypeError(String::New("Bad parameter"))); @@ -540,7 +540,7 @@ Handle SecureContext::AddCRL(const Arguments& args) { Handle SecureContext::AddRootCerts(const Arguments& args) { HandleScope scope(node_isolate); - SecureContext *sc = ObjectWrap::Unwrap(args.Holder()); + SecureContext *sc = ObjectWrap::Unwrap(args.This()); assert(sc->ca_store_ == NULL); @@ -579,7 +579,7 @@ Handle SecureContext::AddRootCerts(const Arguments& args) { Handle SecureContext::SetCiphers(const Arguments& args) { HandleScope scope(node_isolate); - SecureContext *sc = ObjectWrap::Unwrap(args.Holder()); + SecureContext *sc = ObjectWrap::Unwrap(args.This()); if (args.Length() != 1 || !args[0]->IsString()) { return ThrowException(Exception::TypeError(String::New("Bad parameter"))); @@ -594,7 +594,7 @@ Handle SecureContext::SetCiphers(const Arguments& args) { Handle SecureContext::SetOptions(const Arguments& args) { HandleScope scope(node_isolate); - SecureContext *sc = ObjectWrap::Unwrap(args.Holder()); + SecureContext *sc = ObjectWrap::Unwrap(args.This()); if (args.Length() != 1 || !args[0]->IntegerValue()) { return ThrowException(Exception::TypeError(String::New("Bad parameter"))); @@ -608,7 +608,7 @@ Handle SecureContext::SetOptions(const Arguments& args) { Handle SecureContext::SetSessionIdContext(const Arguments& args) { HandleScope scope(node_isolate); - SecureContext *sc = ObjectWrap::Unwrap(args.Holder()); + SecureContext *sc = ObjectWrap::Unwrap(args.This()); if (args.Length() != 1 || !args[0]->IsString()) { return ThrowException(Exception::TypeError(String::New("Bad parameter"))); @@ -640,7 +640,7 @@ Handle SecureContext::SetSessionIdContext(const Arguments& args) { Handle SecureContext::SetSessionTimeout(const Arguments& args) { HandleScope scope(node_isolate); - SecureContext *sc = ObjectWrap::Unwrap(args.Holder()); + SecureContext *sc = ObjectWrap::Unwrap(args.This()); if (args.Length() != 1 || !args[0]->IsInt32()) { return ThrowTypeError("Bad parameter"); @@ -654,7 +654,7 @@ Handle SecureContext::SetSessionTimeout(const Arguments& args) { Handle SecureContext::Close(const Arguments& args) { HandleScope scope(node_isolate); - SecureContext *sc = ObjectWrap::Unwrap(args.Holder()); + SecureContext *sc = ObjectWrap::Unwrap(args.This()); sc->FreeCTXMem(); return False(node_isolate); } @@ -671,7 +671,7 @@ Handle SecureContext::LoadPKCS12(const Arguments& args) { char* pass = NULL; bool ret = false; - SecureContext *sc = ObjectWrap::Unwrap(args.Holder()); + SecureContext *sc = ObjectWrap::Unwrap(args.This()); if (args.Length() < 1) { return ThrowException(Exception::TypeError( @@ -1213,7 +1213,7 @@ Handle Connection::New(const Arguments& args) { HandleScope scope(node_isolate); Connection *p = new Connection(); - p->Wrap(args.Holder()); + p->Wrap(args.This()); if (args.Length() < 1 || !args[0]->IsObject()) { return ThrowException(Exception::Error(String::New( diff --git a/src/node_crypto.h b/src/node_crypto.h index 64fc03abe9..b15600dac3 100644 --- a/src/node_crypto.h +++ b/src/node_crypto.h @@ -225,7 +225,7 @@ class Connection : ObjectWrap { void SetShutdownFlags(); static Connection* Unwrap(const v8::Arguments& args) { - Connection* ss = ObjectWrap::Unwrap(args.Holder()); + Connection* ss = ObjectWrap::Unwrap(args.This()); ss->ClearError(); return ss; } diff --git a/src/node_internals.h b/src/node_internals.h index fb9e066d0e..f4d787586f 100644 --- a/src/node_internals.h +++ b/src/node_internals.h @@ -96,10 +96,10 @@ inline static v8::Handle ThrowRangeError(const char* errmsg) { } #define UNWRAP(type) \ - assert(!args.Holder().IsEmpty()); \ - assert(args.Holder()->InternalFieldCount() > 0); \ + assert(!args.This().IsEmpty()); \ + assert(args.This()->InternalFieldCount() > 0); \ type* wrap = static_cast( \ - args.Holder()->GetAlignedPointerFromInternalField(0)); \ + args.This()->GetAlignedPointerFromInternalField(0)); \ if (!wrap) { \ fprintf(stderr, #type ": Aborting due to unwrap failure at %s:%d\n", \ __FILE__, __LINE__); \ diff --git a/src/node_script.cc b/src/node_script.cc index 6f279bc640..854ee80a70 100644 --- a/src/node_script.cc +++ b/src/node_script.cc @@ -240,7 +240,7 @@ Handle WrappedScript::New(const Arguments& args) { HandleScope scope(node_isolate); WrappedScript *t = new WrappedScript(); - t->Wrap(args.Holder()); + t->Wrap(args.This()); return WrappedScript::EvalMachine(args); @@ -401,7 +401,7 @@ Handle WrappedScript::EvalMachine(const Arguments& args) { return try_catch.ReThrow(); } } else { - WrappedScript *n_script = ObjectWrap::Unwrap(args.Holder()); + WrappedScript *n_script = ObjectWrap::Unwrap(args.This()); if (!n_script) { return ThrowException(Exception::Error( String::New("Must be called as a method of Script."))); @@ -422,7 +422,7 @@ Handle WrappedScript::EvalMachine(const Arguments& args) { return try_catch.ReThrow(); } } else { - WrappedScript *n_script = ObjectWrap::Unwrap(args.Holder()); + WrappedScript *n_script = ObjectWrap::Unwrap(args.This()); if (!n_script) { return ThrowException(Exception::Error( String::New("Must be called as a method of Script."))); diff --git a/src/node_stat_watcher.cc b/src/node_stat_watcher.cc index 582c50c70f..aa6ccf952d 100644 --- a/src/node_stat_watcher.cc +++ b/src/node_stat_watcher.cc @@ -94,7 +94,7 @@ Handle StatWatcher::New(const Arguments& args) { assert(args.IsConstructCall()); HandleScope scope(node_isolate); StatWatcher* s = new StatWatcher(); - s->Wrap(args.Holder()); + s->Wrap(args.This()); return args.This(); } @@ -103,7 +103,7 @@ Handle StatWatcher::Start(const Arguments& args) { assert(args.Length() == 3); HandleScope scope(node_isolate); - StatWatcher* wrap = ObjectWrap::Unwrap(args.Holder()); + StatWatcher* wrap = ObjectWrap::Unwrap(args.This()); String::Utf8Value path(args[0]); const bool persistent = args[1]->BooleanValue(); const uint32_t interval = args[2]->Uint32Value(); @@ -118,7 +118,7 @@ Handle StatWatcher::Start(const Arguments& args) { Handle StatWatcher::Stop(const Arguments& args) { HandleScope scope(node_isolate); - StatWatcher* wrap = ObjectWrap::Unwrap(args.Holder()); + StatWatcher* wrap = ObjectWrap::Unwrap(args.This()); if (onstop_sym.IsEmpty()) { onstop_sym = NODE_PSYMBOL("onstop"); }