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

Unified Diff: extensions/renderer/object_backed_native_handler.cc

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/module_system.cc ('k') | gin/function_template.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/object_backed_native_handler.cc
diff --git a/extensions/renderer/object_backed_native_handler.cc b/extensions/renderer/object_backed_native_handler.cc
index 671730be2f60b6676996ce1e3f9711338960e211..381f242839ad1dc30fecaf8400259e34742b1461 100644
--- a/extensions/renderer/object_backed_native_handler.cc
+++ b/extensions/renderer/object_backed_native_handler.cc
@@ -125,6 +125,7 @@ void ObjectBackedNativeHandler::RouteFunction(
v8_helpers::ToV8StringUnsafe(isolate, feature_name));
v8::Local<v8::FunctionTemplate> function_template =
v8::FunctionTemplate::New(isolate, Router, data);
+ function_template->RemovePrototype();
v8::Local<v8::ObjectTemplate>::New(isolate, object_template_)
->Set(isolate, name.c_str(), function_template);
router_data_.Append(data);
« no previous file with comments | « extensions/renderer/module_system.cc ('k') | gin/function_template.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698