Commit 4dbfdb06 authored by mgiuca's avatar mgiuca Committed by Commit bot

V8 bindings gen: Error if FeaturePolicy and SecureContext together.

This check was previously added for OriginTrialEnabled and SecureContext
(r461653). This applies the same check to FeaturePolicy which has the
same limitation (i.e., this *should* work but currently generates broken
code where FeaturePolicy is totally ignored, and therefore must be a
compile-time error for now.

BUG=695123

Review-Url: https://codereview.chromium.org/2802873003
Cr-Commit-Position: refs/heads/master@{#462730}
parent 31e3ce11
...@@ -423,6 +423,12 @@ def origin_trial_enabled_function_name(definition_or_member): ...@@ -423,6 +423,12 @@ def origin_trial_enabled_function_name(definition_or_member):
'not be specified on the same definition: %s' 'not be specified on the same definition: %s'
% definition_or_member.name) % definition_or_member.name)
if is_feature_policy_enabled and 'SecureContext' in extended_attributes:
raise Exception('[FeaturePolicy] and [SecureContext] must '
'not be specified on the same definition '
'(see https://crbug.com/695123 for workaround): %s'
% definition_or_member.name)
if is_feature_policy_enabled: if is_feature_policy_enabled:
includes.add('bindings/core/v8/ScriptState.h') includes.add('bindings/core/v8/ScriptState.h')
includes.add('platform/feature_policy/FeaturePolicy.h') includes.add('platform/feature_policy/FeaturePolicy.h')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment