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

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

Issue 26785002: IDL compiler: [GetterRaisesException], [RaisesException] for getter (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 7 years, 2 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
« no previous file with comments | « Source/bindings/scripts/unstable/v8_attributes.py ('k') | Source/bindings/tests/idls/TestObjectPython.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/templates/attributes.cpp
diff --git a/Source/bindings/templates/attributes.cpp b/Source/bindings/templates/attributes.cpp
index c71948dc66f78e4ad3949945b156b9d0b6b15a60..7e5276deda9edea9cc296509572de7e6b3f73d5d 100644
--- a/Source/bindings/templates/attributes.cpp
+++ b/Source/bindings/templates/attributes.cpp
@@ -29,6 +29,12 @@ static void {{attribute.name}}AttributeGetter(v8::Local<v8::String> name, const
return;
}
{% endif %}
+ {% if attribute.is_getter_raises_exception %}
+ ExceptionState es(info.GetIsolate());
+ {{attribute.cpp_type}} {{attribute.cpp_value}} = {{attribute.cpp_value_original}};
+ if (UNLIKELY(es.throwIfNeeded()))
+ return;
+ {% endif %}
{% if attribute.is_nullable %}
bool isNull = false;
{{attribute.cpp_type}} {{attribute.cpp_value}} = {{attribute.cpp_value_original}};
« no previous file with comments | « Source/bindings/scripts/unstable/v8_attributes.py ('k') | Source/bindings/tests/idls/TestObjectPython.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698