OLD | NEW |
1 {% extends 'interface_base.cpp' %} | 1 {% extends 'interface_base.cpp' %} |
2 | 2 |
3 | 3 |
4 {##############################################################################} | 4 {##############################################################################} |
5 {% macro attribute_configuration(attribute) %} | 5 {% macro attribute_configuration(attribute) %} |
6 {% set getter_callback = | 6 {% set getter_callback = |
7 '%sV8Internal::%sAttributeGetterCallback' % | 7 '%sV8Internal::%sAttributeGetterCallback' % |
8 (cpp_class, attribute.name) | 8 (cpp_class, attribute.name) |
9 if not attribute.constructor_type else | 9 if not attribute.constructor_type else |
10 '{0}V8Internal::{0}ConstructorGetter'.format(cpp_class) %} | 10 '{0}V8Internal::{0}ConstructorGetter'.format(cpp_class) %} |
(...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
636 } | 636 } |
637 {# Store attributes of type |any| on the wrapper to avoid leaking them | 637 {# Store attributes of type |any| on the wrapper to avoid leaking them |
638 between isolated worlds. #} | 638 between isolated worlds. #} |
639 {% for attribute in any_type_attributes %} | 639 {% for attribute in any_type_attributes %} |
640 options.get("{{attribute.name}}", {{attribute.name}}); | 640 options.get("{{attribute.name}}", {{attribute.name}}); |
641 if (!{{attribute.name}}.IsEmpty()) | 641 if (!{{attribute.name}}.IsEmpty()) |
642 setHiddenValue(info.GetIsolate(), info.Holder(), "{{attribute.name}}
", {{attribute.name}}); | 642 setHiddenValue(info.GetIsolate(), info.Holder(), "{{attribute.name}}
", {{attribute.name}}); |
643 {% endfor %} | 643 {% endfor %} |
644 } | 644 } |
645 {% if is_constructor_raises_exception %} | 645 {% if is_constructor_raises_exception %} |
646 RefPtr<{{cpp_class}}> event = {{cpp_class}}::create(type, eventInit, excepti
onState); | 646 RefPtrWillBeRawPtr<{{cpp_class}}> event = {{cpp_class}}::create(type, eventI
nit, exceptionState); |
647 if (exceptionState.throwIfNeeded()) | 647 if (exceptionState.throwIfNeeded()) |
648 return; | 648 return; |
649 {% else %} | 649 {% else %} |
650 RefPtrWillBeRawPtr<{{cpp_class}}> event = {{cpp_class}}::create(type, eventI
nit); | 650 RefPtrWillBeRawPtr<{{cpp_class}}> event = {{cpp_class}}::create(type, eventI
nit); |
651 {% endif %} | 651 {% endif %} |
652 {% if any_type_attributes and not interface_name == 'ErrorEvent' %} | 652 {% if any_type_attributes and not interface_name == 'ErrorEvent' %} |
653 {# If we're in an isolated world, create a SerializedScriptValue and store | 653 {# If we're in an isolated world, create a SerializedScriptValue and store |
654 it in the event for later cloning if the property is accessed from | 654 it in the event for later cloning if the property is accessed from |
655 another world. The main world case is handled lazily (in custom code). | 655 another world. The main world case is handled lazily (in custom code). |
656 | 656 |
(...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1320 {% endfilter %} | 1320 {% endfilter %} |
1321 } | 1321 } |
1322 | 1322 |
1323 template<> | 1323 template<> |
1324 v8::Handle<v8::Value> toV8NoInline({{cpp_class}}* impl, v8::Handle<v8::Object> c
reationContext, v8::Isolate* isolate) | 1324 v8::Handle<v8::Value> toV8NoInline({{cpp_class}}* impl, v8::Handle<v8::Object> c
reationContext, v8::Isolate* isolate) |
1325 { | 1325 { |
1326 return toV8(impl, creationContext, isolate); | 1326 return toV8(impl, creationContext, isolate); |
1327 } | 1327 } |
1328 | 1328 |
1329 {% endblock %} | 1329 {% endblock %} |
OLD | NEW |