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

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

Issue 68563003: Create DOM exceptions in the correct context. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 1 month 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: Source/bindings/templates/attributes.cpp
diff --git a/Source/bindings/templates/attributes.cpp b/Source/bindings/templates/attributes.cpp
index f88e77bee2658c8c6280cfc4e14334a2759a9b38..8adbb9210fd6873dd9fce8b210e7b9373d829be6 100644
--- a/Source/bindings/templates/attributes.cpp
+++ b/Source/bindings/templates/attributes.cpp
@@ -28,7 +28,7 @@ static void {{attribute.name}}AttributeGetter{{world_suffix}}(const v8::Property
{# Special cases #}
{% if attribute.is_check_security_for_node %}
{# FIXME: consider using a local variable to not call getter twice #}
- ExceptionState es(info.GetIsolate());
+ ExceptionState es(info.Holder(), info.GetIsolate());
if (!BindingSecurity::shouldAllowAccessToNode({{attribute.cpp_value}}, es)) {
v8SetReturnValueNull(info);
es.throwIfNeeded();
@@ -36,7 +36,7 @@ static void {{attribute.name}}AttributeGetter{{world_suffix}}(const v8::Property
}
{% endif %}
{% if attribute.is_getter_raises_exception %}
- ExceptionState es(info.GetIsolate());
+ ExceptionState es(info.Holder(), info.GetIsolate());
{{attribute.cpp_type}} {{attribute.cpp_value}} = {{attribute.cpp_value_original}};
if (UNLIKELY(es.throwIfNeeded()))
return;
@@ -137,7 +137,7 @@ static void {{attribute.name}}AttributeSetter{{world_suffix}}(v8::Local<v8::Valu
CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
{% endif %}
{% if attribute.is_setter_raises_exception %}
- ExceptionState es(info.GetIsolate());
+ ExceptionState es(info.Holder(), info.GetIsolate());
{% endif %}
{% if attribute.is_call_with_execution_context %}
ExecutionContext* scriptContext = getExecutionContext();

Powered by Google App Engine
This is Rietveld 408576698