Skip to content

Commit

Permalink
Don't use deprecated v8::Template::Set() in SetMethod
Browse files Browse the repository at this point in the history
Same as nodejs#560, but for SetMethod.
  • Loading branch information
mcollina committed Apr 27, 2016
1 parent 03e6fa0 commit 84cafae
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions nan.h
Original file line number Diff line number Diff line change
Expand Up @@ -1856,10 +1856,10 @@ NAN_INLINE void SetMethod(
, const char *name
, FunctionCallback callback) {
HandleScope scope;
v8::Local<v8::Function> fn = GetFunction(New<v8::FunctionTemplate>(
callback)).ToLocalChecked();
v8::Local<v8::FunctionTemplate> fn = New<v8::FunctionTemplate>(
callback);
v8::Local<v8::String> fn_name = New(name).ToLocalChecked();
fn->SetName(fn_name);
fn->SetClassName(fn_name);
recv->Set(fn_name, fn);
}

Expand Down

0 comments on commit 84cafae

Please sign in to comment.