Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(193)

Side by Side Diff: Source/bindings/templates/interface.cpp

Issue 686103005: Move the v8::Isolate* parameter to the first parameter of various binding methods in third_party/We… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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({{attribute.name}}, info.GetIsolate())); 556 event->setSerialized{{attribute.name | blink_capitalize}}(Serialized ScriptValue::createAndSwallowExceptions(info.GetIsolate(), {{attribute.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 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
1021 } 1021 }
1022 1022
1023 {% for method in methods if method.overloads and method.overloads.has_partial_ov erloads %} 1023 {% for method in methods if method.overloads and method.overloads.has_partial_ov erloads %}
1024 void {{v8_class}}::register{{method.name | blink_capitalize}}MethodForPartialInt erface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) 1024 void {{v8_class}}::register{{method.name | blink_capitalize}}MethodForPartialInt erface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&))
1025 { 1025 {
1026 {{cpp_class}}V8Internal::{{method.name}}MethodForPartialInterface = method; 1026 {{cpp_class}}V8Internal::{{method.name}}MethodForPartialInterface = method;
1027 } 1027 }
1028 {% endfor %} 1028 {% endfor %}
1029 {% endif %} 1029 {% endif %}
1030 {% endblock %} 1030 {% endblock %}
OLDNEW
« no previous file with comments | « Source/bindings/scripts/v8_types.py ('k') | Source/bindings/tests/results/core/V8TestInterfaceEventConstructor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698