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

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

Issue 1132243004: IDL: Determine maximum distinguishing argument index runtime, if needed (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 7 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 | « Source/bindings/scripts/v8_interface.py ('k') | Source/bindings/templates/interface_base.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 {% 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 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 {{cpp_class}}V8Internal::constructor{{constructor.overload_index}}(i nfo); 516 {{cpp_class}}V8Internal::constructor{{constructor.overload_index}}(i nfo);
517 return; 517 return;
518 } 518 }
519 {% endfor %} 519 {% endfor %}
520 break; 520 break;
521 {% endfor %} 521 {% endfor %}
522 default: 522 default:
523 {# Invalid arity, throw error #} 523 {# Invalid arity, throw error #}
524 {# Report full list of valid arities if gaps and above minimum #} 524 {# Report full list of valid arities if gaps and above minimum #}
525 {% if constructor_overloads.valid_arities %} 525 {% if constructor_overloads.valid_arities %}
526 if (info.Length() >= {{constructor_overloads.minarg}}) { 526 if (info.Length() >= {{constructor_overloads.length}}) {
527 throwArityTypeError(exceptionState, "{{constructor_overloads.valid_a rities}}", info.Length()); 527 throwArityTypeError(exceptionState, "{{constructor_overloads.valid_a rities}}", info.Length());
528 return; 528 return;
529 } 529 }
530 {% endif %} 530 {% endif %}
531 {# Otherwise just report "not enough arguments" #} 531 {# Otherwise just report "not enough arguments" #}
532 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments({{co nstructor_overloads.minarg}}, info.Length())); 532 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments({{co nstructor_overloads.length}}, info.Length()));
533 exceptionState.throwIfNeeded(); 533 exceptionState.throwIfNeeded();
534 return; 534 return;
535 } 535 }
536 {# No match, throw error #} 536 {# No match, throw error #}
537 exceptionState.throwTypeError("No matching constructor signature."); 537 exceptionState.throwTypeError("No matching constructor signature.");
538 exceptionState.throwIfNeeded(); 538 exceptionState.throwIfNeeded();
539 } 539 }
540 540
541 {% endif %} 541 {% endif %}
542 {% endblock %} 542 {% endblock %}
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after
1042 } 1042 }
1043 1043
1044 {% for method in methods if method.overloads and method.overloads.has_partial_ov erloads %} 1044 {% for method in methods if method.overloads and method.overloads.has_partial_ov erloads %}
1045 void {{v8_class}}::register{{method.name | blink_capitalize}}MethodForPartialInt erface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) 1045 void {{v8_class}}::register{{method.name | blink_capitalize}}MethodForPartialInt erface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&))
1046 { 1046 {
1047 {{cpp_class}}V8Internal::{{method.name}}MethodForPartialInterface = method; 1047 {{cpp_class}}V8Internal::{{method.name}}MethodForPartialInterface = method;
1048 } 1048 }
1049 {% endfor %} 1049 {% endfor %}
1050 {% endif %} 1050 {% endif %}
1051 {% endblock %} 1051 {% endblock %}
OLDNEW
« no previous file with comments | « Source/bindings/scripts/v8_interface.py ('k') | Source/bindings/templates/interface_base.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698