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

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

Issue 28333003: IDL compiler: [Conditional] for setters (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/code_generator_v8.pm ('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 50f45c10347209f050277f1db47feaf5ed9499ef..6e4bd24cc18143c8c7170843582ebeaa25a1d420 100644
--- a/Source/bindings/templates/attributes.cpp
+++ b/Source/bindings/templates/attributes.cpp
@@ -104,6 +104,7 @@ static void {{attribute.name}}AttributeGetterCallback{{world_suffix}}(v8::Local<
{##############################################################################}
{% macro attribute_setter(attribute, world_suffix) %}
+{% filter conditional(attribute.conditional_string) %}
static void {{attribute.name}}AttributeSetter{{world_suffix}}(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
{{cpp_class_name}}* imp = {{v8_class_name}}::toNative(info.Holder());
@@ -116,15 +117,18 @@ static void {{attribute.name}}AttributeSetter{{world_suffix}}(v8::Local<v8::Stri
info.Holder()->DeleteHiddenValue(v8::String::NewSymbol("{{attribute.name}}")); // Invalidate the cached value.
{% endif %}
}
+{% endfilter %}
{% endmacro %}
{##############################################################################}
{% macro attribute_setter_callback(attribute, world_suffix) %}
+{% filter conditional(attribute.conditional_string) %}
static void {{attribute.name}}AttributeSetterCallback{{world_suffix}}(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
{{cpp_class_name}}V8Internal::{{attribute.name}}AttributeSetter{{world_suffix}}(name, jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
+{% endfilter %}
{% endmacro %}
« no previous file with comments | « Source/bindings/scripts/code_generator_v8.pm ('k') | Source/bindings/tests/idls/TestObjectPython.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698