OLD | NEW |
1 {% include 'copyright_block.txt' %} | 1 {% include 'copyright_block.txt' %} |
2 #include "config.h" | 2 #include "config.h" |
3 {% filter conditional(conditional_string) %} | 3 {% filter conditional(conditional_string) %} |
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 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
402 {% set named_property_query_callback = | 402 {% set named_property_query_callback = |
403 '%sV8Internal::namedPropertyQueryCallback' % cpp_class | 403 '%sV8Internal::namedPropertyQueryCallback' % cpp_class |
404 if named_property_getter.is_enumerable else '0' %} | 404 if named_property_getter.is_enumerable else '0' %} |
405 {% set named_property_deleter_callback = | 405 {% set named_property_deleter_callback = |
406 '%sV8Internal::namedPropertyDeleterCallback' % cpp_class | 406 '%sV8Internal::namedPropertyDeleterCallback' % cpp_class |
407 if named_property_deleter else '0' %} | 407 if named_property_deleter else '0' %} |
408 {% set named_property_enumerator_callback = | 408 {% set named_property_enumerator_callback = |
409 '%sV8Internal::namedPropertyEnumeratorCallback' % cpp_class | 409 '%sV8Internal::namedPropertyEnumeratorCallback' % cpp_class |
410 if named_property_getter.is_enumerable else '0' %} | 410 if named_property_getter.is_enumerable else '0' %} |
411 { | 411 { |
412 v8::NamedPropertyHandlerConfiguration config({{named_property_getter_cal
lback}}, {{named_property_setter_callback}}, {{named_property_query_callback}},
{{named_property_deleter_callback}}, {{named_property_enumerator_callback}}); | 412 int flags = static_cast<int>(v8::PropertyHandlerFlags::kOnlyInterceptStr
ings); |
413 {# TODO(yukishiino): Determine how to treat Window interface. #} | 413 {% if named_property_getter.do_not_check_security %} |
414 {% if interface_name != 'Window' %} | 414 flags |= static_cast<int>(v8::PropertyHandlerFlags::kAllCanRead); |
415 config.flags = static_cast<v8::PropertyHandlerFlags>(static_cast<int>(co
nfig.flags) | static_cast<int>(v8::PropertyHandlerFlags::kOnlyInterceptStrings))
; | |
416 {% endif %} | 415 {% endif %} |
417 {% if named_property_getter.do_not_check_security %} | 416 {% if not is_override_builtins %} |
418 config.flags = v8::PropertyHandlerFlags::kAllCanRead; | 417 flags |= static_cast<int>(v8::PropertyHandlerFlags::kNonMasking); |
419 {% endif %} | 418 {% endif %} |
420 {# TODO(yukishiino): Determine how to treat Window interface. #} | 419 v8::NamedPropertyHandlerConfiguration config({{named_property_getter_cal
lback}}, {{named_property_setter_callback}}, {{named_property_query_callback}},
{{named_property_deleter_callback}}, {{named_property_enumerator_callback}}, v8:
:Handle<v8::Value>(), static_cast<v8::PropertyHandlerFlags>(flags)); |
421 {% if not is_override_builtins and interface_name != 'Window' %} | |
422 config.flags = static_cast<v8::PropertyHandlerFlags>(static_cast<int>(co
nfig.flags) | static_cast<int>(v8::PropertyHandlerFlags::kNonMasking)); | |
423 {% endif %} | |
424 functionTemplate->{{set_on_template}}()->SetHandler(config); | 420 functionTemplate->{{set_on_template}}()->SetHandler(config); |
425 } | 421 } |
426 {% endif %} | 422 {% endif %} |
427 {% if iterator_method %} | 423 {% if iterator_method %} |
428 {% filter exposed(iterator_method.exposed_test) %} | 424 {% filter exposed(iterator_method.exposed_test) %} |
429 {% filter runtime_enabled(iterator_method.runtime_enabled_function) %} | 425 {% filter runtime_enabled(iterator_method.runtime_enabled_function) %} |
430 static const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedI
teratorConfiguration = { v8::Symbol::GetIterator, {{cpp_class_or_partial}}V8Inte
rnal::iteratorMethodCallback, 0, V8DOMConfiguration::ExposedToAllScripts }; | 426 static const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedI
teratorConfiguration = { v8::Symbol::GetIterator, {{cpp_class_or_partial}}V8Inte
rnal::iteratorMethodCallback, 0, V8DOMConfiguration::ExposedToAllScripts }; |
431 V8DOMConfiguration::installMethod(isolate, prototypeTemplate, defaultSignatu
re, v8::DontDelete, symbolKeyedIteratorConfiguration); | 427 V8DOMConfiguration::installMethod(isolate, prototypeTemplate, defaultSignatu
re, v8::DontDelete, symbolKeyedIteratorConfiguration); |
432 {% endfilter %}{# runtime_enabled() #} | 428 {% endfilter %}{# runtime_enabled() #} |
433 {% endfilter %}{# exposed() #} | 429 {% endfilter %}{# exposed() #} |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
494 {% endfor %} | 490 {% endfor %} |
495 {% for attribute in attributes if attribute.is_implemented_in_private_script %} | 491 {% for attribute in attributes if attribute.is_implemented_in_private_script %} |
496 {{attribute_getter_implemented_in_private_script(attribute)}} | 492 {{attribute_getter_implemented_in_private_script(attribute)}} |
497 {% if attribute.has_setter %} | 493 {% if attribute.has_setter %} |
498 {{attribute_setter_implemented_in_private_script(attribute)}} | 494 {{attribute_setter_implemented_in_private_script(attribute)}} |
499 {% endif %} | 495 {% endif %} |
500 {% endfor %} | 496 {% endfor %} |
501 {% block partial_interface %}{% endblock %} | 497 {% block partial_interface %}{% endblock %} |
502 } // namespace blink | 498 } // namespace blink |
503 {% endfilter %} | 499 {% endfilter %} |
OLD | NEW |