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

Unified Diff: extensions/renderer/object_backed_native_handler.cc

Issue 2150303002: Remove the prototype from all V8 functions that aren't constructors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
Patch Set: 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 3728543d2be924e1d91fb9c3acb6c11e3f8c3270..d64ade51826ddbff6f2d3564420ec452e1428fac 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