| 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 RefPtrWillBeRawPtr<{{cpp_class}}> event = {{cpp_class}}::create(type, eventI
nit, exceptionState); | 646 RefPtr<{{cpp_class}}> event = {{cpp_class}}::create(type, eventInit, excepti
onState); |
| 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 RefPtr<{{cpp_class}}> event = {{cpp_class}}::create(type, eventInit); |
| 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 |
| 657 We do not clone Error objects (exceptions), for 2 reasons: | 657 We do not clone Error objects (exceptions), for 2 reasons: |
| 658 1) Errors carry a reference to the isolated world's global object, and | 658 1) Errors carry a reference to the isolated world's global object, and |
| 659 thus passing it around would cause leakage. | 659 thus passing it around would cause leakage. |
| 660 2) Errors cannot be cloned (or serialized): | 660 2) Errors cannot be cloned (or serialized): |
| (...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1317 {% endfilter %} | 1317 {% endfilter %} |
| 1318 } | 1318 } |
| 1319 | 1319 |
| 1320 template<> | 1320 template<> |
| 1321 v8::Handle<v8::Value> toV8NoInline({{cpp_class}}* impl, v8::Handle<v8::Object> c
reationContext, v8::Isolate* isolate) | 1321 v8::Handle<v8::Value> toV8NoInline({{cpp_class}}* impl, v8::Handle<v8::Object> c
reationContext, v8::Isolate* isolate) |
| 1322 { | 1322 { |
| 1323 return toV8(impl, creationContext, isolate); | 1323 return toV8(impl, creationContext, isolate); |
| 1324 } | 1324 } |
| 1325 | 1325 |
| 1326 {% endblock %} | 1326 {% endblock %} |
| OLD | NEW |