Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(106)

Unified Diff: gin/function_template.h

Issue 2126763002: Remove the prototype from all V8 functions that aren't constructors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updates Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « extensions/renderer/object_backed_native_handler.cc ('k') | gin/modules/module_registry.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gin/function_template.h
diff --git a/gin/function_template.h b/gin/function_template.h
index c0228cb5f83f2a24f8f806dab381c82340fe5455..69ce797c721166a12e0e214aa1d8c6cf1c84cec4 100644
--- a/gin/function_template.h
+++ b/gin/function_template.h
@@ -237,11 +237,12 @@ v8::Local<v8::FunctionTemplate> CreateFunctionTemplate(
typedef internal::CallbackHolder<Sig> HolderT;
HolderT* holder = new HolderT(isolate, callback, callback_flags);
- return v8::FunctionTemplate::New(
- isolate,
- &internal::Dispatcher<Sig>::DispatchToCallback,
- ConvertToV8<v8::Local<v8::External> >(isolate,
- holder->GetHandle(isolate)));
+ v8::Local<v8::FunctionTemplate> tmpl = v8::FunctionTemplate::New(
+ isolate, &internal::Dispatcher<Sig>::DispatchToCallback,
+ ConvertToV8<v8::Local<v8::External>>(isolate,
+ holder->GetHandle(isolate)));
+ tmpl->RemovePrototype();
+ return tmpl;
}
// CreateFunctionHandler installs a CallAsFunction handler on the given
« no previous file with comments | « extensions/renderer/object_backed_native_handler.cc ('k') | gin/modules/module_registry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698