Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a5f415f

Browse filesBrowse files
XadillaXaddaleax
authored andcommitted
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. PR-URL: #13547 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 2ea529b commit a5f415f
Copy full SHA for a5f415f

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Open diff view settings
Collapse file

‎src/node.h‎

Copy file name to clipboardExpand all lines: src/node.h
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ inline void NODE_SET_PROTOTYPE_METHOD(v8::Local<v8::FunctionTemplate> recv,
293293
v8::FunctionTemplate::New(isolate, callback, v8::Local<v8::Value>(), s);
294294
v8::Local<v8::String> fn_name = v8::String::NewFromUtf8(isolate, name);
295295
t->SetClassName(fn_name);
296-
recv->PrototypeTemplate()->Set(v8::String::NewFromUtf8(isolate, name), t);
296+
recv->PrototypeTemplate()->Set(fn_name, t);
297297
}
298298
#define NODE_SET_PROTOTYPE_METHOD node::NODE_SET_PROTOTYPE_METHOD
299299

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.