| Index: third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl
|
| diff --git a/third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl b/third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl
|
| index 212b495db59cbeded62532ba0ee5dc4ed810f360..8941adc9ead35c67694dddffdb47a4403032a00d 100644
|
| --- a/third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl
|
| +++ b/third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl
|
| @@ -6,19 +6,13 @@ static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}(const
|
| {% filter format_remove_duplicates([
|
| 'ExceptionState exceptionState',
|
| 'ScriptState* scriptState = ']) %}
|
| - {% set define_exception_state -%}
|
| ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionContext, "{{interface_name}}", "{{method.name}}");
|
| - {%- endset %}
|
|
|
| {% set function_call = func_call_with_prep_of_args(method, world_suffix) %}
|
|
|
| - {% if 'exceptionState' in function_call or
|
| - (method.returns_promise and not method.is_static) %}
|
| - {{define_exception_state}}
|
| {% if method.returns_promise %}
|
| ExceptionToRejectPromiseScope rejectPromiseScope(info, exceptionState);
|
| {% endif %}
|
| - {% endif %}
|
|
|
| {% if not method.is_static %}
|
| {% if method.returns_promise %}
|
| @@ -35,13 +29,12 @@ static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}(const
|
| // here.
|
| LocalDOMWindow* impl = toLocalDOMWindow({{v8_class}}::toImpl(info.Holder()));
|
| {% else %}
|
| - {{cpp_class}}* impl = {{v8_class}}::toImpl(info.Holder());
|
| + {{cpp_class}}* impl = NativeValueTraits<{{cpp_class}}>::nativeValue(info.GetIsolate(), info.Holder(), exceptionState);
|
| {% endif %}{# interface_name == 'Window' and not method.is_cross_origin #}
|
| {% endif %}{# not method.is_static #}
|
|
|
| {# Security checks #}
|
| {% if method.is_check_security_for_return_value %}
|
| - {{define_exception_state}}
|
| if (!BindingSecurity::shouldAllowAccessTo(currentDOMWindow(info.GetIsolate()), {{method.cpp_value}}, exceptionState)) {
|
| v8SetReturnValueNull(info);
|
| return;
|
|
|