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

Side by Side Diff: third_party/WebKit/Source/bindings/templates/methods.cpp

Issue 2010103002: [Binding] [Refactoring] Remove redundant overloaded methods (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 6 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
OLDNEW
1 {% from 'utilities.cpp' import declare_enum_validation_variable, v8_value_to_loc al_cpp_value, check_origin_trial %} 1 {% from 'utilities.cpp' import declare_enum_validation_variable, v8_value_to_loc al_cpp_value, check_origin_trial %}
2 2
3 {##############################################################################} 3 {##############################################################################}
4 {% macro generate_method(method, world_suffix) %} 4 {% macro generate_method(method, world_suffix) %}
5 {% if method.returns_promise and method.has_exception_state %} 5 {% if method.returns_promise and method.has_exception_state %}
6 static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}Promis e(const v8::FunctionCallbackInfo<v8::Value>& info, ExceptionState& exceptionStat e) 6 static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}Promis e(const v8::FunctionCallbackInfo<v8::Value>& info, ExceptionState& exceptionStat e)
7 {% else %} 7 {% else %}
8 static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}(const v8::FunctionCallbackInfo<v8::Value>& info) 8 static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}(const v8::FunctionCallbackInfo<v8::Value>& info)
9 {% endif %} 9 {% endif %}
10 { 10 {
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 return; 470 return;
471 } 471 }
472 Transferables transferables; 472 Transferables transferables;
473 if (info.Length() > 1) { 473 if (info.Length() > 1) {
474 const int transferablesArgIndex = 1; 474 const int transferablesArgIndex = 1;
475 if (!SerializedScriptValue::extractTransferables(info.GetIsolate(), info [transferablesArgIndex], transferablesArgIndex, transferables, exceptionState)) { 475 if (!SerializedScriptValue::extractTransferables(info.GetIsolate(), info [transferablesArgIndex], transferablesArgIndex, transferables, exceptionState)) {
476 exceptionState.throwIfNeeded(); 476 exceptionState.throwIfNeeded();
477 return; 477 return;
478 } 478 }
479 } 479 }
480 RefPtr<SerializedScriptValue> message = SerializedScriptValueFactory::instan ce().create(info.GetIsolate(), info[0], &transferables, exceptionState); 480 RefPtr<SerializedScriptValue> message = SerializedScriptValueFactory::instan ce().create(info.GetIsolate(), info[0], &transferables, nullptr, exceptionState) ;
481 if (exceptionState.throwIfNeeded()) 481 if (exceptionState.throwIfNeeded())
482 return; 482 return;
483 // FIXME: Only pass context/exceptionState if instance really requires it. 483 // FIXME: Only pass context/exceptionState if instance really requires it.
484 ExecutionContext* context = currentExecutionContext(info.GetIsolate()); 484 ExecutionContext* context = currentExecutionContext(info.GetIsolate());
485 instance->postMessage(context, message.release(), transferables.messagePorts , exceptionState); 485 instance->postMessage(context, message.release(), transferables.messagePorts , exceptionState);
486 exceptionState.throwIfNeeded(); 486 exceptionState.throwIfNeeded();
487 } 487 }
488 {% endmacro %} 488 {% endmacro %}
489 489
490 {##############################################################################} 490 {##############################################################################}
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
683 {% filter runtime_enabled(method.overloads.runtime_enabled_function_all 683 {% filter runtime_enabled(method.overloads.runtime_enabled_function_all
684 if method.overloads else 684 if method.overloads else
685 method.runtime_enabled_function) %} 685 method.runtime_enabled_function) %}
686 const V8DOMConfiguration::MethodConfiguration {{method.name}}MethodConfiguration = {{method_configuration(method)}}; 686 const V8DOMConfiguration::MethodConfiguration {{method.name}}MethodConfiguration = {{method_configuration(method)}};
687 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), proto typeObject, interfaceObject, signature, {{method.name}}MethodConfiguration); 687 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), proto typeObject, interfaceObject, signature, {{method.name}}MethodConfiguration);
688 {% endfilter %}{# runtime_enabled() #} 688 {% endfilter %}{# runtime_enabled() #}
689 {% endfilter %}{# exposed() #} 689 {% endfilter %}{# exposed() #}
690 {% endfor %} 690 {% endfor %}
691 {% endif %} 691 {% endif %}
692 {%- endmacro %} 692 {%- endmacro %}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698