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

Unified Diff: net/proxy/proxy_resolver_v8.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
Index: net/proxy/proxy_resolver_v8.cc
diff --git a/net/proxy/proxy_resolver_v8.cc b/net/proxy/proxy_resolver_v8.cc
index 3c9233d21e0b1fd020f9772923b66d460b892e14..16ad61f742407697a94edeabd1da4de96300130f 100644
--- a/net/proxy/proxy_resolver_v8.cc
+++ b/net/proxy/proxy_resolver_v8.cc
@@ -507,21 +507,25 @@ class ProxyResolverV8::Context {
// Attach the javascript bindings.
v8::Local<v8::FunctionTemplate> alert_template =
v8::FunctionTemplate::New(isolate_, &AlertCallback, v8_this);
+ alert_template->RemovePrototype();
global_template->Set(ASCIILiteralToV8String(isolate_, "alert"),
alert_template);
v8::Local<v8::FunctionTemplate> my_ip_address_template =
v8::FunctionTemplate::New(isolate_, &MyIpAddressCallback, v8_this);
+ my_ip_address_template->RemovePrototype();
global_template->Set(ASCIILiteralToV8String(isolate_, "myIpAddress"),
my_ip_address_template);
v8::Local<v8::FunctionTemplate> dns_resolve_template =
v8::FunctionTemplate::New(isolate_, &DnsResolveCallback, v8_this);
+ dns_resolve_template->RemovePrototype();
global_template->Set(ASCIILiteralToV8String(isolate_, "dnsResolve"),
dns_resolve_template);
v8::Local<v8::FunctionTemplate> is_plain_host_name_template =
v8::FunctionTemplate::New(isolate_, &IsPlainHostNameCallback, v8_this);
+ is_plain_host_name_template->RemovePrototype();
global_template->Set(ASCIILiteralToV8String(isolate_, "isPlainHostName"),
is_plain_host_name_template);
@@ -529,11 +533,13 @@ class ProxyResolverV8::Context {
v8::Local<v8::FunctionTemplate> dns_resolve_ex_template =
v8::FunctionTemplate::New(isolate_, &DnsResolveExCallback, v8_this);
+ dns_resolve_ex_template->RemovePrototype();
global_template->Set(ASCIILiteralToV8String(isolate_, "dnsResolveEx"),
dns_resolve_ex_template);
v8::Local<v8::FunctionTemplate> my_ip_address_ex_template =
v8::FunctionTemplate::New(isolate_, &MyIpAddressExCallback, v8_this);
+ my_ip_address_ex_template->RemovePrototype();
global_template->Set(ASCIILiteralToV8String(isolate_, "myIpAddressEx"),
my_ip_address_ex_template);
@@ -541,11 +547,13 @@ class ProxyResolverV8::Context {
v8::FunctionTemplate::New(isolate_,
&SortIpAddressListCallback,
v8_this);
+ sort_ip_address_list_template->RemovePrototype();
global_template->Set(ASCIILiteralToV8String(isolate_, "sortIpAddressList"),
sort_ip_address_list_template);
v8::Local<v8::FunctionTemplate> is_in_net_ex_template =
v8::FunctionTemplate::New(isolate_, &IsInNetExCallback, v8_this);
+ is_in_net_ex_template->RemovePrototype();
global_template->Set(ASCIILiteralToV8String(isolate_, "isInNetEx"),
is_in_net_ex_template);
« no previous file with comments | « mojo/public/js/validation_unittests.js ('k') | third_party/WebKit/LayoutTests/fast/dom/Window/window-methods-construct.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698