Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src: merge fn_name in NODE_SET_PROTOTYPE_METHOD #13547

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
src: merge fn_name in NODE_SET_PROTOTYPE_METHOD
Merge two duplicate `fn_name` into one in NODE_SET_PROTOTYPE_METHOD,
it may improve a bit performance.
  • Loading branch information
XadillaX committed Jun 8, 2017
commit 6cc9cc401c080f6a8fb3b8c7a6a1e680de3db61a
2 changes: 1 addition & 1 deletion src/node.h
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ inline void NODE_SET_PROTOTYPE_METHOD(v8::Local<v8::FunctionTemplate> recv,
v8::FunctionTemplate::New(isolate, callback, v8::Local<v8::Value>(), s);
v8::Local<v8::String> fn_name = v8::String::NewFromUtf8(isolate, name);
t->SetClassName(fn_name);
recv->PrototypeTemplate()->Set(v8::String::NewFromUtf8(isolate, name), t);
recv->PrototypeTemplate()->Set(fn_name, t);
}
#define NODE_SET_PROTOTYPE_METHOD node::NODE_SET_PROTOTYPE_METHOD

Expand Down