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

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

Issue 1111183008: [bindings] Make interface template simplified for getter/setter/deleter while using CallWith=Script… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/templates/interface.cpp
diff --git a/Source/bindings/templates/interface.cpp b/Source/bindings/templates/interface.cpp
index 415d5b64ff30fecbd85a8bc199f21a2d6e3c8394..a74f426fa320aedb76f49b02fc88bb99134597c2 100644
--- a/Source/bindings/templates/interface.cpp
+++ b/Source/bindings/templates/interface.cpp
@@ -11,12 +11,10 @@ static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo
{% if getter.is_raises_exception %}
ExceptionState exceptionState(ExceptionState::IndexedGetterContext, "{{interface_name}}", info.Holder(), info.GetIsolate());
{% endif %}
- {% if getter.is_call_with_script_state %}
- ScriptState* scriptState = ScriptState::current(info.GetIsolate());
- {% endif %}
{% set getter_name = getter.name or 'anonymousIndexedGetter' %}
{% set getter_arguments = ['index'] %}
{% if getter.is_call_with_script_state %}
+ ScriptState* scriptState = ScriptState::current(info.GetIsolate());
{% set getter_arguments = ['scriptState'] + getter_arguments %}
{% endif %}
{% if getter.is_raises_exception %}
@@ -76,12 +74,10 @@ static void indexedPropertySetter(uint32_t index, v8::Local<v8::Value> v8Value,
return;
}
{% endif %}
- {% if setter.is_call_with_script_state %}
- ScriptState* scriptState = ScriptState::current(info.GetIsolate());
- {% endif %}
{% set setter_name = setter.name or 'anonymousIndexedSetter' %}
{% set setter_arguments = ['index', 'propertyValue'] %}
{% if setter.is_call_with_script_state %}
+ ScriptState* scriptState = ScriptState::current(info.GetIsolate());
{% set setter_arguments = ['scriptState'] + setter_arguments %}
{% endif %}
{% if setter.is_raises_exception %}
@@ -130,12 +126,10 @@ static void indexedPropertyDeleter(uint32_t index, const v8::PropertyCallbackInf
{% if deleter.is_raises_exception %}
ExceptionState exceptionState(ExceptionState::IndexedDeletionContext, "{{interface_name}}", info.Holder(), info.GetIsolate());
{% endif %}
- {% if deleter.is_call_with_script_state %}
- ScriptState* scriptState = ScriptState::current(info.GetIsolate());
- {% endif %}
{% set deleter_name = deleter.name or 'anonymousIndexedDeleter' %}
{% set deleter_arguments = ['index'] %}
{% if deleter.is_call_with_script_state %}
+ ScriptState* scriptState = ScriptState::current(info.GetIsolate());
{% set deleter_arguments = ['scriptState'] + deleter_arguments %}
{% endif %}
{% if deleter.is_raises_exception %}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698