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

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

Issue 2207423002: Implement '[SecureContext]' IDL attribute for interfaces, methods and attributes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Feedback. Created 4 years, 4 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
Index: third_party/WebKit/Source/bindings/templates/interface.cpp
diff --git a/third_party/WebKit/Source/bindings/templates/interface.cpp b/third_party/WebKit/Source/bindings/templates/interface.cpp
index 32c4425ee774be86596a0345a6a36094281c12ef..4b6adc465abb2ea5d3d6bf6bc161717f402c649a 100644
--- a/third_party/WebKit/Source/bindings/templates/interface.cpp
+++ b/third_party/WebKit/Source/bindings/templates/interface.cpp
@@ -911,11 +911,15 @@ prototypeObject->CreateDataProperty(context, unscopablesSymbol, unscopeables).Fr
{% from 'attributes.cpp' 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 and attribute.on_prototype %}
+{% 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_function) %}
const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {{attribute_configuration(attribute)}};
V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, accessorConfiguration);
-{% endfilter %}
+{% endfilter %}{# runtime_enabled #}
+{% endfilter %}{# secure_context #}
+{% endfilter %}{# exposed #}
{% endfor %}
{% endmacro %}

Powered by Google App Engine
This is Rietveld 408576698