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

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

Issue 183973007: Also use transition types when constructing Events that raise exceptions. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 9 months 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
« no previous file with comments | « no previous file | Source/bindings/tests/results/V8TestInterfaceEventConstructor.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 %}
OLDNEW
« no previous file with comments | « no previous file | Source/bindings/tests/results/V8TestInterfaceEventConstructor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698