OLD | NEW |
1 {% extends 'interface_base.cpp' %} | 1 {% extends 'interface_base.cpp' %} |
2 | 2 |
3 | 3 |
4 {##############################################################################} | 4 {##############################################################################} |
5 {% block indexed_property_getter %} | 5 {% block indexed_property_getter %} |
6 {% if indexed_property_getter and not indexed_property_getter.is_custom %} | 6 {% if indexed_property_getter and not indexed_property_getter.is_custom %} |
7 {% set getter = indexed_property_getter %} | 7 {% set getter = indexed_property_getter %} |
8 static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo
<v8::Value>& info) | 8 static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo
<v8::Value>& info) |
9 { | 9 { |
10 {{cpp_class}}* impl = {{v8_class}}::toImpl(info.Holder()); | 10 {{cpp_class}}* impl = {{v8_class}}::toImpl(info.Holder()); |
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
546 another world. The main world case is handled lazily (in custom code). | 546 another world. The main world case is handled lazily (in custom code). |
547 | 547 |
548 We do not clone Error objects (exceptions), for 2 reasons: | 548 We do not clone Error objects (exceptions), for 2 reasons: |
549 1) Errors carry a reference to the isolated world's global object, and | 549 1) Errors carry a reference to the isolated world's global object, and |
550 thus passing it around would cause leakage. | 550 thus passing it around would cause leakage. |
551 2) Errors cannot be cloned (or serialized): | 551 2) Errors cannot be cloned (or serialized): |
552 http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom-in
terfaces.html#safe-passing-of-structured-data #} | 552 http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom-in
terfaces.html#safe-passing-of-structured-data #} |
553 if (DOMWrapperWorld::current(info.GetIsolate()).isIsolatedWorld()) { | 553 if (DOMWrapperWorld::current(info.GetIsolate()).isIsolatedWorld()) { |
554 {% for attribute in any_type_attributes %} | 554 {% for attribute in any_type_attributes %} |
555 if (!{{attribute.name}}.IsEmpty()) | 555 if (!{{attribute.name}}.IsEmpty()) |
556 event->setSerialized{{attribute.name | blink_capitalize}}(Serialized
ScriptValue::createAndSwallowExceptions(info.GetIsolate(), {{attribute.name}})); | 556 event->setSerialized{{attribute.name | blink_capitalize}}(Serialized
ScriptValueFactory::factory().createAndSwallowExceptions(info.GetIsolate(), {{at
tribute.name}})); |
557 {% endfor %} | 557 {% endfor %} |
558 } | 558 } |
559 | 559 |
560 {% endif %} | 560 {% endif %} |
561 v8::Handle<v8::Object> wrapper = info.Holder(); | 561 v8::Handle<v8::Object> wrapper = info.Holder(); |
562 event->associateWithWrapper(&{{v8_class}}::wrapperTypeInfo, wrapper, info.Ge
tIsolate()); | 562 event->associateWithWrapper(&{{v8_class}}::wrapperTypeInfo, wrapper, info.Ge
tIsolate()); |
563 v8SetReturnValue(info, wrapper); | 563 v8SetReturnValue(info, wrapper); |
564 } | 564 } |
565 | 565 |
566 {% endif %} | 566 {% endif %} |
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
984 } | 984 } |
985 | 985 |
986 {% for method in methods if method.overloads and method.overloads.has_partial_ov
erloads %} | 986 {% for method in methods if method.overloads and method.overloads.has_partial_ov
erloads %} |
987 void {{v8_class}}::register{{method.name | blink_capitalize}}MethodForPartialInt
erface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) | 987 void {{v8_class}}::register{{method.name | blink_capitalize}}MethodForPartialInt
erface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) |
988 { | 988 { |
989 {{cpp_class}}V8Internal::{{method.name}}MethodForPartialInterface = method; | 989 {{cpp_class}}V8Internal::{{method.name}}MethodForPartialInterface = method; |
990 } | 990 } |
991 {% endfor %} | 991 {% endfor %} |
992 {% endif %} | 992 {% endif %} |
993 {% endblock %} | 993 {% endblock %} |
OLD | NEW |