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

Side by Side Diff: Source/bindings/templates/interface_base.cpp

Issue 772743003: Move the v8::Isolate* parameter to the first parameter of various binding methods in third_party/We… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file has been auto-generated by {{code_generator}}. DO NOT MODIFY! 5 // This file has been auto-generated by {{code_generator}}. DO NOT MODIFY!
6 6
7 #include "config.h" 7 #include "config.h"
8 {% filter conditional(conditional_string) %} 8 {% filter conditional(conditional_string) %}
9 #include "{{v8_class_or_partial}}.h" 9 #include "{{v8_class_or_partial}}.h"
10 10
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 {% else %} 270 {% else %}
271 functionTemplate->ReadOnlyPrototype(); 271 functionTemplate->ReadOnlyPrototype();
272 {% endif %} 272 {% endif %}
273 273
274 v8::Local<v8::Signature> defaultSignature; 274 v8::Local<v8::Signature> defaultSignature;
275 {% set parent_template = 275 {% set parent_template =
276 'V8%s::domTemplate(isolate)' % parent_interface 276 'V8%s::domTemplate(isolate)' % parent_interface
277 if parent_interface else 'v8::Local<v8::FunctionTemplate>()' %} 277 if parent_interface else 'v8::Local<v8::FunctionTemplate>()' %}
278 {% if runtime_enabled_function %} 278 {% if runtime_enabled_function %}
279 if (!{{runtime_enabled_function}}()) 279 if (!{{runtime_enabled_function}}())
280 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(functionT emplate, "", {{parent_template}}, {{v8_class}}::internalFieldCount, 0, 0, 0, 0, 0, 0, isolate); 280 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, functionTemplate, "", {{parent_template}}, {{v8_class}}::internalFieldCount, 0, 0, 0, 0, 0, 0);
281 else 281 else
282 {% endif %} 282 {% endif %}
283 {% set runtime_enabled_indent = 4 if runtime_enabled_function else 0 %} 283 {% set runtime_enabled_indent = 4 if runtime_enabled_function else 0 %}
284 {% filter indent(runtime_enabled_indent, true) %} 284 {% filter indent(runtime_enabled_indent, true) %}
285 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(functionTempl ate, "{{interface_name}}", {{parent_template}}, {{v8_class}}::internalFieldCount , 285 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, func tionTemplate, "{{interface_name}}", {{parent_template}}, {{v8_class}}::internalF ieldCount,
286 {# Test needed as size 0 arrays definitions are not allowed per standard 286 {# Test needed as size 0 arrays definitions are not allowed per standard
287 (so objects have distinct addresses), which is enforced by MSVC. 287 (so objects have distinct addresses), which is enforced by MSVC.
288 8.5.1 Aggregates [dcl.init.aggr] 288 8.5.1 Aggregates [dcl.init.aggr]
289 An array of unknown size initialized with a brace-enclosed 289 An array of unknown size initialized with a brace-enclosed
290 initializer-list containing n initializer-clauses, where n shall be 290 initializer-list containing n initializer-clauses, where n shall be
291 greater than zero, is defined as having n elements (8.3.4). #} 291 greater than zero, is defined as having n elements (8.3.4). #}
292 {% set attributes_name, attributes_length = 292 {% set attributes_name, attributes_length =
293 ('%sAttributes' % v8_class, 293 ('%sAttributes' % v8_class,
294 'WTF_ARRAY_LENGTH(%sAttributes)' % v8_class) 294 'WTF_ARRAY_LENGTH(%sAttributes)' % v8_class)
295 if has_attribute_configuration else (0, 0) %} 295 if has_attribute_configuration else (0, 0) %}
296 {% set accessors_name, accessors_length = 296 {% set accessors_name, accessors_length =
297 ('%sAccessors' % v8_class, 297 ('%sAccessors' % v8_class,
298 'WTF_ARRAY_LENGTH(%sAccessors)' % v8_class) 298 'WTF_ARRAY_LENGTH(%sAccessors)' % v8_class)
299 if has_accessors else (0, 0) %} 299 if has_accessors else (0, 0) %}
300 {% set methods_name, methods_length = 300 {% set methods_name, methods_length =
301 ('%sMethods' % v8_class, 301 ('%sMethods' % v8_class,
302 'WTF_ARRAY_LENGTH(%sMethods)' % v8_class) 302 'WTF_ARRAY_LENGTH(%sMethods)' % v8_class)
303 if method_configuration_methods else (0, 0) %} 303 if method_configuration_methods else (0, 0) %}
304 {{attributes_name}}, {{attributes_length}}, 304 {{attributes_name}}, {{attributes_length}},
305 {{accessors_name}}, {{accessors_length}}, 305 {{accessors_name}}, {{accessors_length}},
306 {{methods_name}}, {{methods_length}}, 306 {{methods_name}}, {{methods_length}});
307 isolate);
308 {% endfilter %} 307 {% endfilter %}
309 308
310 {% if constructors or has_custom_constructor or has_event_constructor %} 309 {% if constructors or has_custom_constructor or has_event_constructor %}
311 functionTemplate->SetCallHandler({{v8_class}}::constructorCallback); 310 functionTemplate->SetCallHandler({{v8_class}}::constructorCallback);
312 functionTemplate->SetLength({{interface_length}}); 311 functionTemplate->SetLength({{interface_length}});
313 {% endif %} 312 {% endif %}
314 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT emplate(); 313 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT emplate();
315 ALLOW_UNUSED_LOCAL(instanceTemplate); 314 ALLOW_UNUSED_LOCAL(instanceTemplate);
316 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp eTemplate(); 315 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp eTemplate();
317 ALLOW_UNUSED_LOCAL(prototypeTemplate); 316 ALLOW_UNUSED_LOCAL(prototypeTemplate);
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 {% endfor %} 456 {% endfor %}
458 {% for attribute in attributes if attribute.is_implemented_in_private_script %} 457 {% for attribute in attributes if attribute.is_implemented_in_private_script %}
459 {{attribute_getter_implemented_in_private_script(attribute)}} 458 {{attribute_getter_implemented_in_private_script(attribute)}}
460 {% if not attribute.is_read_only or attribute.put_forwards %} 459 {% if not attribute.is_read_only or attribute.put_forwards %}
461 {{attribute_setter_implemented_in_private_script(attribute)}} 460 {{attribute_setter_implemented_in_private_script(attribute)}}
462 {% endif %} 461 {% endif %}
463 {% endfor %} 462 {% endfor %}
464 {% block partial_interface %}{% endblock %} 463 {% block partial_interface %}{% endblock %}
465 } // namespace blink 464 } // namespace blink
466 {% endfilter %} 465 {% endfilter %}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698