| OLD | NEW |
| 1 {% from 'utilities.cpp.tmpl' import declare_enum_validation_variable, v8_value_t
o_local_cpp_value %} | 1 {% from 'utilities.cpp.tmpl' import declare_enum_validation_variable, v8_value_t
o_local_cpp_value %} |
| 2 | 2 |
| 3 {##############################################################################} | 3 {##############################################################################} |
| 4 {% macro generate_method(method, world_suffix) %} | 4 {% macro generate_method(method, world_suffix) %} |
| 5 static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}(const
v8::FunctionCallbackInfo<v8::Value>& info) { | 5 static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}(const
v8::FunctionCallbackInfo<v8::Value>& info) { |
| 6 {% filter format_remove_duplicates([ | 6 {% filter format_remove_duplicates([ |
| 7 'ExceptionState exceptionState', | 7 'ExceptionState exceptionState', |
| 8 'ScriptState* scriptState = ']) %} | 8 'ScriptState* scriptState = ']) %} |
| 9 {% set define_exception_state -%} | 9 {% set define_exception_state -%} |
| 10 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCont
ext, "{{interface_name}}", "{{method.name}}"); | 10 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCont
ext, "{{interface_name}}", "{{method.name}}"); |
| (...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 456 // Neuter the original array buffers on the sender context. | 456 // Neuter the original array buffers on the sender context. |
| 457 SerializedScriptValue::transferArrayBufferContents(info.GetIsolate(), transf
erableArrayBuffers, exceptionState); | 457 SerializedScriptValue::transferArrayBufferContents(info.GetIsolate(), transf
erableArrayBuffers, exceptionState); |
| 458 if (exceptionState.hadException()) | 458 if (exceptionState.hadException()) |
| 459 return; | 459 return; |
| 460 // Neuter the original image bitmaps on the sender context. | 460 // Neuter the original image bitmaps on the sender context. |
| 461 SerializedScriptValue::transferImageBitmapContents(info.GetIsolate(), transf
erableImageBitmaps, exceptionState); | 461 SerializedScriptValue::transferImageBitmapContents(info.GetIsolate(), transf
erableImageBitmaps, exceptionState); |
| 462 if (exceptionState.hadException()) | 462 if (exceptionState.hadException()) |
| 463 return; | 463 return; |
| 464 } | 464 } |
| 465 | 465 |
| 466 message->unregisterMemoryAllocatedByCurrentScriptContext(); |
| 467 |
| 466 // FIXME: Only pass scriptState/exceptionState if instance really requires it. | 468 // FIXME: Only pass scriptState/exceptionState if instance really requires it. |
| 467 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | 469 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| 468 instance->postMessage(scriptState, message.release(), transferables.messagePor
ts, exceptionState); | 470 instance->postMessage(scriptState, message.release(), transferables.messagePor
ts, exceptionState); |
| 469 } | 471 } |
| 470 {% endmacro %} | 472 {% endmacro %} |
| 471 | 473 |
| 472 | 474 |
| 473 {##############################################################################} | 475 {##############################################################################} |
| 474 {% macro method_callback(method, world_suffix) %} | 476 {% macro method_callback(method, world_suffix) %} |
| 475 void {{v8_class_or_partial}}::{{method.name}}MethodCallback{{world_suffix}}(cons
t v8::FunctionCallbackInfo<v8::Value>& info) { | 477 void {{v8_class_or_partial}}::{{method.name}}MethodCallback{{world_suffix}}(cons
t v8::FunctionCallbackInfo<v8::Value>& info) { |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 626 if method.overloads else | 628 if method.overloads else |
| 627 method.runtime_enabled_feature_name) %} | 629 method.runtime_enabled_feature_name) %} |
| 628 const V8DOMConfiguration::MethodConfiguration {{method.name}}MethodConfiguration
= {{method_configuration(method)}}; | 630 const V8DOMConfiguration::MethodConfiguration {{method.name}}MethodConfiguration
= {{method_configuration(method)}}; |
| 629 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), proto
typeObject, interfaceObject, signature, {{method.name}}MethodConfiguration); | 631 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), proto
typeObject, interfaceObject, signature, {{method.name}}MethodConfiguration); |
| 630 {% endfilter %}{# runtime_enabled() #} | 632 {% endfilter %}{# runtime_enabled() #} |
| 631 {% endfilter %}{# exposed() #} | 633 {% endfilter %}{# exposed() #} |
| 632 {% endfilter %}{# secure_context() #} | 634 {% endfilter %}{# secure_context() #} |
| 633 {% endfor %} | 635 {% endfor %} |
| 634 {% endif %} | 636 {% endif %} |
| 635 {%- endmacro %} | 637 {%- endmacro %} |
| OLD | NEW |