diff --git a/doc/api/addons.markdown b/doc/api/addons.markdown index e2915b6ceb44..0e67ffc5af4c 100644 --- a/doc/api/addons.markdown +++ b/doc/api/addons.markdown @@ -401,7 +401,7 @@ prototype: Isolate* isolate = Isolate::GetCurrent(); HandleScope scope(isolate); - MyObject* obj = ObjectWrap::Unwrap(args.This()); + MyObject* obj = ObjectWrap::Unwrap(args.Holder()); obj->value_ += 1; args.GetReturnValue().Set(Number::New(isolate, obj->value_)); @@ -539,7 +539,7 @@ The implementation is similar to the above in `myobject.cc`: Isolate* isolate = Isolate::GetCurrent(); HandleScope scope(isolate); - MyObject* obj = ObjectWrap::Unwrap(args.This()); + MyObject* obj = ObjectWrap::Unwrap(args.Holder()); obj->value_ += 1; args.GetReturnValue().Set(Number::New(isolate, obj->value_)); diff --git a/src/fs_event_wrap.cc b/src/fs_event_wrap.cc index 9c1a2b6c6f28..7bd8b310f257 100644 --- a/src/fs_event_wrap.cc +++ b/src/fs_event_wrap.cc @@ -106,7 +106,7 @@ void FSEventWrap::Start(const FunctionCallbackInfo& args) { Environment* env = Environment::GetCurrent(args.GetIsolate()); HandleScope scope(env->isolate()); - FSEventWrap* wrap = Unwrap(args.This()); + FSEventWrap* wrap = Unwrap(args.Holder()); if (args.Length() < 1 || !args[0]->IsString()) { return env->ThrowTypeError("Bad arguments"); @@ -189,7 +189,7 @@ void FSEventWrap::Close(const FunctionCallbackInfo& args) { Environment* env = Environment::GetCurrent(args.GetIsolate()); HandleScope scope(env->isolate()); - FSEventWrap* wrap = Unwrap(args.This()); + FSEventWrap* wrap = Unwrap(args.Holder()); if (wrap == NULL || wrap->initialized_ == false) return; diff --git a/src/handle_wrap.cc b/src/handle_wrap.cc index 245c0e10adf9..f713750d7f93 100644 --- a/src/handle_wrap.cc +++ b/src/handle_wrap.cc @@ -47,7 +47,7 @@ void HandleWrap::Ref(const FunctionCallbackInfo& args) { Environment* env = Environment::GetCurrent(args.GetIsolate()); HandleScope scope(env->isolate()); - HandleWrap* wrap = Unwrap(args.This()); + HandleWrap* wrap = Unwrap(args.Holder()); if (wrap != NULL && wrap->handle__ != NULL) { uv_ref(wrap->handle__); @@ -60,7 +60,7 @@ void HandleWrap::Unref(const FunctionCallbackInfo& args) { Environment* env = Environment::GetCurrent(args.GetIsolate()); HandleScope scope(env->isolate()); - HandleWrap* wrap = Unwrap(args.This()); + HandleWrap* wrap = Unwrap(args.Holder()); if (wrap != NULL && wrap->handle__ != NULL) { uv_unref(wrap->handle__); @@ -73,7 +73,7 @@ void HandleWrap::Close(const FunctionCallbackInfo& args) { Environment* env = Environment::GetCurrent(args.GetIsolate()); HandleScope scope(env->isolate()); - HandleWrap* wrap = Unwrap(args.This()); + HandleWrap* wrap = Unwrap(args.Holder()); // guard against uninitialized handle or double close if (wrap == NULL || wrap->handle__ == NULL) diff --git a/src/node.h b/src/node.h index ff55cf19e389..810541104c88 100644 --- a/src/node.h +++ b/src/node.h @@ -212,8 +212,9 @@ inline void NODE_SET_PROTOTYPE_METHOD(v8::Handle recv, v8::FunctionCallback callback) { v8::Isolate* isolate = v8::Isolate::GetCurrent(); v8::HandleScope handle_scope(isolate); - v8::Local t = v8::FunctionTemplate::New(isolate, - callback); + v8::Handle s = v8::Signature::New(recv); + v8::Local t = + v8::FunctionTemplate::New(isolate, callback, v8::Handle(), s); recv->PrototypeTemplate()->Set(v8::String::NewFromUtf8(isolate, name), t->GetFunction()); } diff --git a/src/node_contextify.cc b/src/node_contextify.cc index df63ed4f0776..14b1243936a2 100644 --- a/src/node_contextify.cc +++ b/src/node_contextify.cc @@ -634,7 +634,7 @@ class ContextifyScript : public BaseObject { } ContextifyScript* wrapped_script = - Unwrap(args.This()); + Unwrap(args.Holder()); Local