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

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/V8PerIsolateData.cpp

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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/PrivateScriptRunner.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 } 270 }
271 271
272 v8::Local<v8::FunctionTemplate> V8PerIsolateData::findOrCreateOperationTemplate( const DOMWrapperWorld& world, const void* key, v8::FunctionCallback callback, v8 ::Local<v8::Value> data, v8::Local<v8::Signature> signature, int length) 272 v8::Local<v8::FunctionTemplate> V8PerIsolateData::findOrCreateOperationTemplate( const DOMWrapperWorld& world, const void* key, v8::FunctionCallback callback, v8 ::Local<v8::Value> data, v8::Local<v8::Signature> signature, int length)
273 { 273 {
274 auto& map = selectOperationTemplateMap(world); 274 auto& map = selectOperationTemplateMap(world);
275 auto result = map.find(key); 275 auto result = map.find(key);
276 if (result != map.end()) 276 if (result != map.end())
277 return result->value.Get(isolate()); 277 return result->value.Get(isolate());
278 278
279 v8::Local<v8::FunctionTemplate> templ = v8::FunctionTemplate::New(isolate(), callback, data, signature, length); 279 v8::Local<v8::FunctionTemplate> templ = v8::FunctionTemplate::New(isolate(), callback, data, signature, length);
280 templ->RemovePrototype();
280 map.add(key, v8::Eternal<v8::FunctionTemplate>(isolate(), templ)); 281 map.add(key, v8::Eternal<v8::FunctionTemplate>(isolate(), templ));
281 return templ; 282 return templ;
282 } 283 }
283 284
284 v8::Local<v8::FunctionTemplate> V8PerIsolateData::findInterfaceTemplate(const DO MWrapperWorld& world, const void* key) 285 v8::Local<v8::FunctionTemplate> V8PerIsolateData::findInterfaceTemplate(const DO MWrapperWorld& world, const void* key)
285 { 286 {
286 auto& map = selectInterfaceTemplateMap(world); 287 auto& map = selectInterfaceTemplateMap(world);
287 auto result = map.find(key); 288 auto result = map.find(key);
288 if (result != map.end()) 289 if (result != map.end())
289 return result->value.Get(isolate()); 290 return result->value.Get(isolate());
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 380
380 void V8PerIsolateData::addActiveScriptWrappable(ActiveScriptWrappable* wrappable ) 381 void V8PerIsolateData::addActiveScriptWrappable(ActiveScriptWrappable* wrappable )
381 { 382 {
382 if (!m_activeScriptWrappables) 383 if (!m_activeScriptWrappables)
383 m_activeScriptWrappables = new ActiveScriptWrappableSet(); 384 m_activeScriptWrappables = new ActiveScriptWrappableSet();
384 385
385 m_activeScriptWrappables->add(wrappable); 386 m_activeScriptWrappables->add(wrappable);
386 } 387 }
387 388
388 } // namespace blink 389 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/PrivateScriptRunner.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698