| Index: third_party/WebKit/Source/bindings/templates/attributes.cpp
|
| diff --git a/third_party/WebKit/Source/bindings/templates/attributes.cpp b/third_party/WebKit/Source/bindings/templates/attributes.cpp
|
| index 4ae6427e6f435a189c7b42f0301aea9bb29d8855..a7eafaf47d6197cb13b8c8f4921fd7565a4d8d63 100644
|
| --- a/third_party/WebKit/Source/bindings/templates/attributes.cpp
|
| +++ b/third_party/WebKit/Source/bindings/templates/attributes.cpp
|
| @@ -77,7 +77,7 @@ const v8::FunctionCallbackInfo<v8::Value>& info
|
| {% endif %}
|
| {# Checks #}
|
| {% if attribute.is_getter_raises_exception %}
|
| - if (UNLIKELY(exceptionState.throwIfNeeded()))
|
| + if (UNLIKELY(exceptionState.hadException()))
|
| return;
|
| {% endif %}
|
| {# Security checks #}
|
| @@ -85,7 +85,6 @@ const v8::FunctionCallbackInfo<v8::Value>& info
|
| {% if attribute.is_check_security_for_receiver %}
|
| if (!BindingSecurity::shouldAllowAccessTo(currentDOMWindow(info.GetIsolate()), impl, exceptionState)) {
|
| v8SetReturnValueNull(info);
|
| - exceptionState.throwIfNeeded();
|
| return;
|
| }
|
| {% endif %}
|
| @@ -93,7 +92,6 @@ const v8::FunctionCallbackInfo<v8::Value>& info
|
| {% if attribute.is_check_security_for_return_value %}
|
| if (!BindingSecurity::shouldAllowAccessTo(currentDOMWindow(info.GetIsolate()), {{attribute.cpp_value}}, exceptionState)) {
|
| v8SetReturnValueNull(info);
|
| - exceptionState.throwIfNeeded();
|
| return;
|
| }
|
| {% endif %}
|
| @@ -281,7 +279,6 @@ v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info
|
| {% if attribute.is_check_security_for_receiver %}
|
| if (!BindingSecurity::shouldAllowAccessTo(currentDOMWindow(info.GetIsolate()), impl, exceptionState)) {
|
| v8SetReturnValue(info, v8Value);
|
| - exceptionState.throwIfNeeded();
|
| return;
|
| }
|
| {% endif %}
|
| @@ -306,7 +303,6 @@ v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info
|
| TypeError), per http://www.w3.org/TR/WebIDL/#es-interface #}
|
| if (!cppValue{% if attribute.is_nullable %} && !isUndefinedOrNull(v8Value){% endif %}) {
|
| exceptionState.throwTypeError("The provided value is not of type '{{attribute.idl_type}}'.");
|
| - exceptionState.throwIfNeeded();
|
| return;
|
| }
|
| {% elif attribute.enum_values %}
|
| @@ -318,6 +314,11 @@ v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info
|
| {{declare_enum_validation_variable(attribute.enum_values) | indent}}
|
| if (!isValidEnum(cppValue, validValues, WTF_ARRAY_LENGTH(validValues), "{{attribute.enum_type}}", exceptionState)) {
|
| currentExecutionContext(info.GetIsolate())->addConsoleMessage(ConsoleMessage::create(JSMessageSource, WarningMessageLevel, exceptionState.message()));
|
| + // http://heycam.github.io/webidl/#idl-enums
|
| + // Assignment of an invalid string value to an attribute is ignored,
|
| + // while passing such a value as an operation argument results in
|
| + // an exception being thrown.
|
| + exceptionState.clearException();
|
| return;
|
| }
|
| {% endif %}
|
| @@ -344,9 +345,6 @@ v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info
|
| {{attribute.cpp_setter}};
|
| {% endif %}
|
| {# Post-set #}
|
| - {% if attribute.is_setter_raises_exception %}
|
| - exceptionState.throwIfNeeded();
|
| - {% endif %}
|
| {% if attribute.cached_attribute_validation_method %}
|
| V8HiddenValue::deleteHiddenValue(ScriptState::current(info.GetIsolate()), holder, v8AtomicString(info.GetIsolate(), "{{attribute.name}}")); // Invalidate the cached value.
|
| {% endif %}
|
|
|