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

Side by Side Diff: third_party/WebKit/Source/bindings/templates/interface_base.cpp.tmpl

Issue 2452073002: Freeze global prototype chain per WebIDL (Closed)
Patch Set: Test improvements Created 4 years, 1 month 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 {% filter format_blink_cpp_source_code %} 1 {% filter format_blink_cpp_source_code %}
2 2
3 {% include 'copyright_block.txt' %} 3 {% include 'copyright_block.txt' %}
4 #include "{{v8_class_or_partial}}.h" 4 #include "{{v8_class_or_partial}}.h"
5 5
6 {% for filename in cpp_includes if filename != '%s.h' % cpp_class_or_partial %} 6 {% for filename in cpp_includes if filename != '%s.h' % cpp_class_or_partial %}
7 #include "{{filename}}" 7 #include "{{filename}}"
8 {% endfor %} 8 {% endfor %}
9 9
10 namespace blink { 10 namespace blink {
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemp late); 310 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemp late);
311 ALLOW_UNUSED_LOCAL(signature); 311 ALLOW_UNUSED_LOCAL(signature);
312 v8::Local<v8::ObjectTemplate> instanceTemplate = interfaceTemplate->InstanceTe mplate(); 312 v8::Local<v8::ObjectTemplate> instanceTemplate = interfaceTemplate->InstanceTe mplate();
313 ALLOW_UNUSED_LOCAL(instanceTemplate); 313 ALLOW_UNUSED_LOCAL(instanceTemplate);
314 v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->Prototype Template(); 314 v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->Prototype Template();
315 ALLOW_UNUSED_LOCAL(prototypeTemplate); 315 ALLOW_UNUSED_LOCAL(prototypeTemplate);
316 316
317 {%- if interface_name == 'Window' and not is_partial %}{{newline}} 317 {%- if interface_name == 'Window' and not is_partial %}{{newline}}
318 prototypeTemplate->SetInternalFieldCount(V8Window::internalFieldCount); 318 prototypeTemplate->SetInternalFieldCount(V8Window::internalFieldCount);
319 {% endif %} 319 {% endif %}
320 {% if is_immutable_prototype %}{{newline}}
321 // Global object prototype chain consists of Immutable Prototype Exotic Object s
322 prototypeTemplate->SetImmutableProto();
323 {% endif %}
324 {% if is_global %}{{newline}}
325 // Global objects are Immutable Prototype Exotic Objects
326 instanceTemplate->SetImmutableProto();
327 {% endif %}
320 328
321 // Register DOM constants, attributes and operations. 329 // Register DOM constants, attributes and operations.
322 {% filter runtime_enabled(runtime_enabled_function) %} 330 {% filter runtime_enabled(runtime_enabled_function) %}
323 {% if constants %} 331 {% if constants %}
324 {{install_constants() | indent(2)}} 332 {{install_constants() | indent(2)}}
325 {% endif %} 333 {% endif %}
326 {% if attributes | has_attribute_configuration %} 334 {% if attributes | has_attribute_configuration %}
327 V8DOMConfiguration::installAttributes(isolate, world, instanceTemplate, protot ypeTemplate, {{'%sAttributes' % v8_class}}, {{'WTF_ARRAY_LENGTH(%sAttributes)' % v8_class}}); 335 V8DOMConfiguration::installAttributes(isolate, world, instanceTemplate, protot ypeTemplate, {{'%sAttributes' % v8_class}}, {{'WTF_ARRAY_LENGTH(%sAttributes)' % v8_class}});
328 {% endif %} 336 {% endif %}
329 {% if attributes | has_lazy_data_attribute_configuration %} 337 {% if attributes | has_lazy_data_attribute_configuration %}
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 {% for attribute in attributes if attribute.is_implemented_in_private_script %} 483 {% for attribute in attributes if attribute.is_implemented_in_private_script %}
476 {{attribute_getter_implemented_in_private_script(attribute)}} 484 {{attribute_getter_implemented_in_private_script(attribute)}}
477 {% if attribute.has_setter %} 485 {% if attribute.has_setter %}
478 {{attribute_setter_implemented_in_private_script(attribute)}} 486 {{attribute_setter_implemented_in_private_script(attribute)}}
479 {% endif %} 487 {% endif %}
480 {% endfor %} 488 {% endfor %}
481 {% block partial_interface %}{% endblock %} 489 {% block partial_interface %}{% endblock %}
482 } // namespace blink 490 } // namespace blink
483 491
484 {% endfilter %}{# format_blink_cpp_source_code #} 492 {% endfilter %}{# format_blink_cpp_source_code #}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698