New issue
Advanced search Search tips

Issue 862601 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jul 25
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Feature policy should only parse names for features available in the browser

Project Member Reported by iclell...@chromium.org, Jul 11

Issue description

The logic around which feature names can be parsed needs to be cleaned up; some features are actually behind runtime flags, but the feature names are always accepted. This will matter once we ship the `policy` interface, as the names will be exposed in `document.policy.allowedFeatures()`.

In general, adding a feature to the default feature list should be contingent on that feature being available in the renderer, and should check the same runtime flags as the rest of the code for that feature.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jul 12

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/77533434f64cde2813381a26cce2247a62070a21

commit 77533434f64cde2813381a26cce2247a62070a21
Author: Ian Clelland <iclelland@chromium.org>
Date: Thu Jul 12 19:32:34 2018

Clean up feature policy flags.

This fixes the default feature list, ensuring that features only appear
in it if they are actually enabled with the correct runtime feature
flags. Even if they are shipped as 'stable', they can still be disabled,
and should not be parsed in that case, or appear in the output of
document.policy.allowedFeatures().

Bug:  862601 
Change-Id: I207a17818ed6696e9d029b86adcf42e4b58b6516
Reviewed-on: https://chromium-review.googlesource.com/1133307
Reviewed-by: Jeremy Roman <jbroman@chromium.org>
Commit-Queue: Ian Clelland <iclelland@chromium.org>
Cr-Commit-Position: refs/heads/master@{#574677}
[modify] https://crrev.com/77533434f64cde2813381a26cce2247a62070a21/third_party/blink/renderer/platform/feature_policy/feature_policy.cc
[modify] https://crrev.com/77533434f64cde2813381a26cce2247a62070a21/third_party/blink/renderer/platform/runtime_enabled_features.json5

Status: Fixed (was: Started)

Sign in to add a comment