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

Unified Diff: third_party/WebKit/Source/bindings/templates/attributes.cpp

Issue 2061113002: Remove ExceptionState::throwIfNeeded Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: temp Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
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 ccd092281c5264e69acc00c36d0013f130c65466..25b4e32a50b8ceb80992d8af92616804314b5ff5 100644
--- a/third_party/WebKit/Source/bindings/templates/attributes.cpp
+++ b/third_party/WebKit/Source/bindings/templates/attributes.cpp
@@ -82,7 +82,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 #}
@@ -90,7 +90,6 @@ const v8::FunctionCallbackInfo<v8::Value>& info
{% if attribute.is_check_security_for_receiver %}
if (!BindingSecurity::shouldAllowAccessTo(info.GetIsolate(), currentDOMWindow(info.GetIsolate()), impl, exceptionState)) {
v8SetReturnValueNull(info);
- exceptionState.throwIfNeeded();
return;
}
{% endif %}
@@ -98,7 +97,6 @@ const v8::FunctionCallbackInfo<v8::Value>& info
{% if attribute.is_check_security_for_return_value %}
if (!BindingSecurity::shouldAllowAccessTo(info.GetIsolate(), currentDOMWindow(info.GetIsolate()), {{attribute.cpp_value}}, exceptionState)) {
v8SetReturnValueNull(info);
- exceptionState.throwIfNeeded();
return;
}
{% endif %}
@@ -290,7 +288,6 @@ v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info
{% if attribute.is_check_security_for_receiver %}
if (!BindingSecurity::shouldAllowAccessTo(info.GetIsolate(), currentDOMWindow(info.GetIsolate()), impl, exceptionState)) {
v8SetReturnValue(info, v8Value);
- exceptionState.throwIfNeeded();
return;
}
{% endif %}
@@ -315,7 +312,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 %}
@@ -349,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 %}
« no previous file with comments | « third_party/WebKit/Source/bindings/scripts/v8_types.py ('k') | third_party/WebKit/Source/bindings/templates/interface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698