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

Unified Diff: third_party/WebKit/Source/bindings/scripts/code_generator.py

Issue 2880713002: Support combination of [OriginTrialEnabled] and [SecureContext] (Closed)
Patch Set: Rebase Created 3 years, 7 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/scripts/code_generator.py
diff --git a/third_party/WebKit/Source/bindings/scripts/code_generator.py b/third_party/WebKit/Source/bindings/scripts/code_generator.py
index e6e1764ed86e5f643d938b01051ccde0f2e80b93..5fd68f2d6bf59be928ac264db0293704f833517c 100644
--- a/third_party/WebKit/Source/bindings/scripts/code_generator.py
+++ b/third_party/WebKit/Source/bindings/scripts/code_generator.py
@@ -58,9 +58,11 @@ def exposed_if(code, exposed_test):
# [SecureContext]
-def secure_context_if(code, secure_context_test):
+def secure_context_if(code, secure_context_test, test_result=None):
if not secure_context_test:
return code
+ if test_result:
+ return generate_indented_conditional(code, test_result)
return generate_indented_conditional(code, 'executionContext && (%s)' % secure_context_test)
@@ -72,7 +74,6 @@ def runtime_enabled_if(code, name):
function = v8_utilities.runtime_enabled_function(name)
return generate_indented_conditional(code, function)
-
def initialize_jinja_env(cache_dir):
jinja_env = jinja2.Environment(
loader=jinja2.FileSystemLoader(TEMPLATES_DIR),

Powered by Google App Engine
This is Rietveld 408576698