0

Better describe how origin trials affect static method generation

R=mek@chromium.org

Change-Id: Ia6dae3707cc43c5958dba3cf4373a8cfe4b79fc6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3410476
Auto-Submit: Christian Biesinger <cbiesinger@chromium.org>
Reviewed-by: Marijn Kruisselbrink <mek@chromium.org>
Commit-Queue: Christian Biesinger <cbiesinger@chromium.org>
Cr-Commit-Position: refs/heads/main@{#963046}
This commit is contained in:
Christian Biesinger
2022-01-25 17:18:08 +00:00
committed by Chromium LUCI CQ
parent cf7f0b0784
commit 0651e8259a
2 changed files with 8 additions and 3 deletions
docs
third_party/blink/renderer/platform

@ -23,6 +23,11 @@ name will be used in the origin trials developer console. You can have both
to be enabled either by using the `--enable-experimental-web-platform-features`
flag **or** the origin trial.
You will have to change all callers of the no-argument overload of
`RuntimeEnabledFeatures::FooEnabled()` to the overload that takes a
`const FeatureContext*`. You can pass an `ExecutionContext` here
(e.g. using `ExecutionContext::From(ScriptState*)`).
You may have a feature that is not available on all platforms, or need to limit
the trial to specific platforms. Use `origin_trial_os: [list]` to specify which
platforms will allow the trial to be enabled. The list values are case-

@ -63,9 +63,9 @@
// feature to be enabled at runtime on a per-page basis through a signed
// token for the corresponding feature name. Declaring the
// origin_trial_feature_name will modify the generation of the static
// methods in runtime_enabled_features.h/cpp. The static method then allows
// the feature implementation to check if the trial is enabled for the
// current context.
// methods in runtime_enabled_features.h/cpp -- the no-parameter version
// will not be generated, so all callers have to use the version that takes
// a const FeatureContext* argument.
origin_trial_feature_name: {
},
// origin_trial_os specifies the platforms where the trial is available.