OLD | NEW |
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 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 {% set indexed_property_setter_callback = | 351 {% set indexed_property_setter_callback = |
352 '%sV8Internal::indexedPropertySetterCallback' % cpp_class | 352 '%sV8Internal::indexedPropertySetterCallback' % cpp_class |
353 if indexed_property_setter else '0' %} | 353 if indexed_property_setter else '0' %} |
354 {% set indexed_property_query_callback = '0' %}{# Unused #} | 354 {% set indexed_property_query_callback = '0' %}{# Unused #} |
355 {% set indexed_property_deleter_callback = | 355 {% set indexed_property_deleter_callback = |
356 '%sV8Internal::indexedPropertyDeleterCallback' % cpp_class | 356 '%sV8Internal::indexedPropertyDeleterCallback' % cpp_class |
357 if indexed_property_deleter else '0' %} | 357 if indexed_property_deleter else '0' %} |
358 {% set indexed_property_enumerator_callback = | 358 {% set indexed_property_enumerator_callback = |
359 'indexedPropertyEnumerator<%s>' % cpp_class | 359 'indexedPropertyEnumerator<%s>' % cpp_class |
360 if indexed_property_getter.is_enumerable else '0' %} | 360 if indexed_property_getter.is_enumerable else '0' %} |
361 functionTemplate->{{set_on_template}}()->SetHandler(v8::IndexedPropertyHandl
erConfiguration({{indexed_property_getter_callback}}, {{indexed_property_setter_
callback}}, {{indexed_property_query_callback}}, {{indexed_property_deleter_call
back}}, {{indexed_property_enumerator_callback}})); | 361 { |
| 362 v8::IndexedPropertyHandlerConfiguration config({{indexed_property_getter
_callback}}, {{indexed_property_setter_callback}}, {{indexed_property_query_call
back}}, {{indexed_property_deleter_callback}}, {{indexed_property_enumerator_cal
lback}}); |
| 363 {% if indexed_property_getter.do_not_check_security %} |
| 364 config.flags = v8::PropertyHandlerFlags::kAllCanRead; |
| 365 {% endif %} |
| 366 functionTemplate->{{set_on_template}}()->SetHandler(config); |
| 367 } |
362 {% endif %} | 368 {% endif %} |
363 {% if named_property_getter %} | 369 {% if named_property_getter %} |
364 {# if have named properties, MUST have a named property getter #} | 370 {# if have named properties, MUST have a named property getter #} |
365 {% set named_property_getter_callback = | 371 {% set named_property_getter_callback = |
366 '%sV8Internal::namedPropertyGetterCallback' % cpp_class %} | 372 '%sV8Internal::namedPropertyGetterCallback' % cpp_class %} |
367 {% set named_property_setter_callback = | 373 {% set named_property_setter_callback = |
368 '%sV8Internal::namedPropertySetterCallback' % cpp_class | 374 '%sV8Internal::namedPropertySetterCallback' % cpp_class |
369 if named_property_setter else '0' %} | 375 if named_property_setter else '0' %} |
370 {% set named_property_query_callback = | 376 {% set named_property_query_callback = |
371 '%sV8Internal::namedPropertyQueryCallback' % cpp_class | 377 '%sV8Internal::namedPropertyQueryCallback' % cpp_class |
372 if named_property_getter.is_enumerable else '0' %} | 378 if named_property_getter.is_enumerable else '0' %} |
373 {% set named_property_deleter_callback = | 379 {% set named_property_deleter_callback = |
374 '%sV8Internal::namedPropertyDeleterCallback' % cpp_class | 380 '%sV8Internal::namedPropertyDeleterCallback' % cpp_class |
375 if named_property_deleter else '0' %} | 381 if named_property_deleter else '0' %} |
376 {% set named_property_enumerator_callback = | 382 {% set named_property_enumerator_callback = |
377 '%sV8Internal::namedPropertyEnumeratorCallback' % cpp_class | 383 '%sV8Internal::namedPropertyEnumeratorCallback' % cpp_class |
378 if named_property_getter.is_enumerable else '0' %} | 384 if named_property_getter.is_enumerable else '0' %} |
379 functionTemplate->{{set_on_template}}()->SetHandler(v8::NamedPropertyHandler
Configuration({{named_property_getter_callback}}, {{named_property_setter_callba
ck}}, {{named_property_query_callback}}, {{named_property_deleter_callback}}, {{
named_property_enumerator_callback}})); | 385 { |
| 386 v8::NamedPropertyHandlerConfiguration config({{named_property_getter_cal
lback}}, {{named_property_setter_callback}}, {{named_property_query_callback}},
{{named_property_deleter_callback}}, {{named_property_enumerator_callback}}); |
| 387 {% if named_property_getter.do_not_check_security %} |
| 388 config.flags = v8::PropertyHandlerFlags::kAllCanRead; |
| 389 {% endif %} |
| 390 functionTemplate->{{set_on_template}}()->SetHandler(config); |
| 391 } |
380 {% endif %} | 392 {% endif %} |
381 {% if iterator_method %} | 393 {% if iterator_method %} |
382 {% filter per_context_enabled(iterator_method.per_context_enabled_function)
%} | 394 {% filter per_context_enabled(iterator_method.per_context_enabled_function)
%} |
383 {% filter exposed(iterator_method.exposed_test) %} | 395 {% filter exposed(iterator_method.exposed_test) %} |
384 {% filter runtime_enabled(iterator_method.runtime_enabled_function) %} | 396 {% filter runtime_enabled(iterator_method.runtime_enabled_function) %} |
385 static const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedI
teratorConfiguration = { v8::Symbol::GetIterator, {{cpp_class_or_partial}}V8Inte
rnal::iteratorMethodCallback, 0, V8DOMConfiguration::ExposedToAllScripts }; | 397 static const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedI
teratorConfiguration = { v8::Symbol::GetIterator, {{cpp_class_or_partial}}V8Inte
rnal::iteratorMethodCallback, 0, V8DOMConfiguration::ExposedToAllScripts }; |
386 V8DOMConfiguration::installMethod(prototypeTemplate, defaultSignature, v8::D
ontDelete, symbolKeyedIteratorConfiguration, isolate); | 398 V8DOMConfiguration::installMethod(prototypeTemplate, defaultSignature, v8::D
ontDelete, symbolKeyedIteratorConfiguration, isolate); |
387 {% endfilter %}{# runtime_enabled() #} | 399 {% endfilter %}{# runtime_enabled() #} |
388 {% endfilter %}{# exposed() #} | 400 {% endfilter %}{# exposed() #} |
389 {% endfilter %}{# per_context_enabled() #} | 401 {% endfilter %}{# per_context_enabled() #} |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
473 {% endfor %} | 485 {% endfor %} |
474 {% for attribute in attributes if attribute.is_implemented_in_private_script %} | 486 {% for attribute in attributes if attribute.is_implemented_in_private_script %} |
475 {{attribute_getter_implemented_in_private_script(attribute)}} | 487 {{attribute_getter_implemented_in_private_script(attribute)}} |
476 {% if not attribute.is_read_only or attribute.put_forwards %} | 488 {% if not attribute.is_read_only or attribute.put_forwards %} |
477 {{attribute_setter_implemented_in_private_script(attribute)}} | 489 {{attribute_setter_implemented_in_private_script(attribute)}} |
478 {% endif %} | 490 {% endif %} |
479 {% endfor %} | 491 {% endfor %} |
480 {% block partial_interface %}{% endblock %} | 492 {% block partial_interface %}{% endblock %} |
481 } // namespace blink | 493 } // namespace blink |
482 {% endfilter %} | 494 {% endfilter %} |
OLD | NEW |