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

Unified Diff: third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl

Issue 2687263002: Use a block scope in install_conditionally_enabled_attributes_on_prototype
Patch Set: Created 3 years, 10 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 | third_party/WebKit/Source/bindings/tests/idls/core/TestInterfacePartial.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl
diff --git a/third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl b/third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl
index c10b0ff334ebd57882ba29dabfa52f8a1ebca18e..8016130db75afbde701a6f2add3e5ffa7a56ae81 100644
--- a/third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl
+++ b/third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl
@@ -902,18 +902,20 @@ prototypeObject->CreateDataProperty(context, unscopablesSymbol, unscopables).Fro
{##############################################################################}
{% macro install_conditionally_enabled_attributes_on_prototype() %}
{% from 'attributes.cpp.tmpl' import attribute_configuration with context %}
-ExecutionContext* executionContext = toExecutionContext(context);
-v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemplate);
-{% for attribute in attributes if (attribute.exposed_test or attribute.secure_context_test) and attribute.on_prototype %}
-{% filter exposed(attribute.exposed_test) %}
-{% filter secure_context(attribute.secure_context_test) %}
-{% filter runtime_enabled(attribute.runtime_enabled_feature_name) %}
-const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {{attribute_configuration(attribute)}};
-V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, accessorConfiguration);
-{% endfilter %}{# runtime_enabled #}
-{% endfilter %}{# secure_context #}
-{% endfilter %}{# exposed #}
-{% endfor %}
+{
+ ExecutionContext* executionContext = toExecutionContext(context);
+ v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemplate);
+ {% for attribute in attributes if (attribute.exposed_test or attribute.secure_context_test) and attribute.on_prototype %}
+ {% filter exposed(attribute.exposed_test) %}
+ {% filter secure_context(attribute.secure_context_test) %}
+ {% filter runtime_enabled(attribute.runtime_enabled_feature_name) %}
+ const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {{attribute_configuration(attribute)}};
+ V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, accessorConfiguration);
+ {% endfilter %}{# runtime_enabled #}
+ {% endfilter %}{# secure_context #}
+ {% endfilter %}{# exposed #}
+ {% endfor %}
+}
{% endmacro %}
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/tests/idls/core/TestInterfacePartial.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698