| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 %} |
| OLD | NEW |