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

Issue 1861433002: Make [OriginTrialEnabled] and [RuntimeEnabled] mutually exclusive (Closed)

Created:
4 years, 8 months ago by chasej
Modified:
4 years, 8 months ago
CC:
ortuno, blink-reviews, blink-reviews-bindings_chromium.org, chasej+watch_chromium.org, chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@586594-separate-tests
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make [OriginTrialEnabled] and [RuntimeEnabled] mutually exclusive The original intent of the [OriginTrialEnabled] extended attribute was that it would be used as a drop-in replacement for [RuntimeEnabled]. The implementation for enabling via origin trials includes a check for runtime feature flags, so there is no need to use both attributes. When implemented, a bug actually made both attributes required, in order to generate the desired bindings code. This CL fixes the bug so that the [RuntimeEnabled] attribute is not required. An explicit check was added to cause an error if both attributes are used on the same IDL member. The goal of the check is avoid confusion - the intended usage of experimental features should be clearer by marking with [RuntimeEnabled] vs [OriginTrialEnabled]. The implementation was also refactored, as the bindings logic was mostly copy/paste reuse across attributes, constants, interfaces and methods. The logic is more centralized now, similar to the approach for the [MeasureAs] attribute. BUG=586594 Committed: https://crrev.com/0c7efcf9ce5d2223c6aba69b94be77da64adea2b Cr-Commit-Position: refs/heads/master@{#386080}

Patch Set 1 #

Patch Set 2 : Clean up commented code #

Total comments: 16

Patch Set 3 : Address comments #

Patch Set 4 : Rename script function used to generate code #

Total comments: 2

Patch Set 5 : Rebase #

Patch Set 6 : Correct IDL for Web Bluetooth #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+121 lines, -157 lines) Patch
M third_party/WebKit/Source/bindings/IDLExtendedAttributes.md View 1 2 3 4 1 chunk +0 lines, -4 lines 2 comments Download
M third_party/WebKit/Source/bindings/scripts/v8_attributes.py View 1 2 3 4 chunks +2 lines, -12 lines 0 comments Download
M third_party/WebKit/Source/bindings/scripts/v8_interface.py View 1 2 3 5 chunks +4 lines, -18 lines 0 comments Download
M third_party/WebKit/Source/bindings/scripts/v8_methods.py View 1 2 3 4 3 chunks +1 line, -10 lines 0 comments Download
M third_party/WebKit/Source/bindings/scripts/v8_utilities.py View 1 2 3 2 chunks +37 lines, -21 lines 0 comments Download
M third_party/WebKit/Source/bindings/templates/attributes.cpp View 1 2 3 4 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/bindings/templates/constants.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/templates/methods.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/templates/utilities.cpp View 1 2 3 1 chunk +6 lines, -14 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/idls/core/TestObject.idl View 1 2 3 4 4 chunks +13 lines, -13 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface2.cpp View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.cpp View 1 2 3 4 12 chunks +48 lines, -48 lines 0 comments Download
M third_party/WebKit/Source/core/origin_trials/testing/InternalsFrobulate.idl View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/bluetooth/Bluetooth.idl View 1 2 3 4 5 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/modules/bluetooth/BluetoothAdvertisingData.idl View 1 2 3 4 5 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/modules/bluetooth/BluetoothCharacteristicProperties.idl View 1 2 3 4 5 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.idl View 1 2 3 4 5 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTCharacteristic.idl View 1 2 3 4 5 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTServer.idl View 1 2 3 4 5 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTService.idl View 1 2 3 4 5 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/modules/bluetooth/BluetoothUUID.idl View 1 2 3 4 5 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/modules/bluetooth/NavigatorBluetooth.idl View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 23 (9 generated)
chasej
haraken, iclelland, please take a look. I'd suggest this be reviewed after the cleanup CLs ...
4 years, 8 months ago (2016-04-04 21:07:59 UTC) #3
haraken
LGTM, thanks for splitting the CLs! It was easy to review :) https://codereview.chromium.org/1861433002/diff/20001/third_party/WebKit/Source/bindings/scripts/v8_utilities.py File third_party/WebKit/Source/bindings/scripts/v8_utilities.py ...
4 years, 8 months ago (2016-04-05 01:23:18 UTC) #5
iclelland
https://codereview.chromium.org/1861433002/diff/20001/third_party/WebKit/Source/bindings/scripts/v8_utilities.py File third_party/WebKit/Source/bindings/scripts/v8_utilities.py (right): https://codereview.chromium.org/1861433002/diff/20001/third_party/WebKit/Source/bindings/scripts/v8_utilities.py#newcode370 third_party/WebKit/Source/bindings/scripts/v8_utilities.py:370: def origin_trial_enabled(definition_or_member, interface): This function's name suggests that it ...
4 years, 8 months ago (2016-04-05 13:38:59 UTC) #6
chasej
https://codereview.chromium.org/1861433002/diff/20001/third_party/WebKit/Source/bindings/scripts/v8_utilities.py File third_party/WebKit/Source/bindings/scripts/v8_utilities.py (right): https://codereview.chromium.org/1861433002/diff/20001/third_party/WebKit/Source/bindings/scripts/v8_utilities.py#newcode370 third_party/WebKit/Source/bindings/scripts/v8_utilities.py:370: def origin_trial_enabled(definition_or_member, interface): On 2016/04/05 13:38:58, iclelland wrote: > ...
4 years, 8 months ago (2016-04-05 19:50:22 UTC) #7
iclelland
https://codereview.chromium.org/1861433002/diff/20001/third_party/WebKit/Source/bindings/scripts/v8_utilities.py File third_party/WebKit/Source/bindings/scripts/v8_utilities.py (right): https://codereview.chromium.org/1861433002/diff/20001/third_party/WebKit/Source/bindings/scripts/v8_utilities.py#newcode370 third_party/WebKit/Source/bindings/scripts/v8_utilities.py:370: def origin_trial_enabled(definition_or_member, interface): On 2016/04/05 19:50:22, chasej wrote: > ...
4 years, 8 months ago (2016-04-07 14:00:32 UTC) #8
chasej
iclelland, please take another look. jyasskin, please take a look at bluetooth/.
4 years, 8 months ago (2016-04-07 21:17:42 UTC) #10
Jeffrey Yasskin
LGTM assuming our flag will still work. https://codereview.chromium.org/1861433002/diff/100001/third_party/WebKit/Source/bindings/IDLExtendedAttributes.md File third_party/WebKit/Source/bindings/IDLExtendedAttributes.md (right): https://codereview.chromium.org/1861433002/diff/100001/third_party/WebKit/Source/bindings/IDLExtendedAttributes.md#newcode1032 third_party/WebKit/Source/bindings/IDLExtendedAttributes.md:1032: Summary: Like ...
4 years, 8 months ago (2016-04-08 00:07:49 UTC) #11
ortuno
I just tried this patch with the tests from http://crrev.com/1858293002 and I can confirm our ...
4 years, 8 months ago (2016-04-08 14:49:59 UTC) #13
iclelland
LGTM (one nit, maybe not in scope for this CL) However, maybe we want to ...
4 years, 8 months ago (2016-04-08 14:51:32 UTC) #14
chasej
https://codereview.chromium.org/1861433002/diff/60001/third_party/WebKit/Source/bindings/scripts/v8_interface.py File third_party/WebKit/Source/bindings/scripts/v8_interface.py (right): https://codereview.chromium.org/1861433002/diff/60001/third_party/WebKit/Source/bindings/scripts/v8_interface.py#newcode49 third_party/WebKit/Source/bindings/scripts/v8_interface.py:49: from v8_utilities import (cpp_name_or_partial, capitalize, cpp_name, gc_type, On 2016/04/08 ...
4 years, 8 months ago (2016-04-08 15:11:14 UTC) #15
chasej
On 2016/04/08 14:51:32, iclelland wrote: > LGTM (one nit, maybe not in scope for this ...
4 years, 8 months ago (2016-04-08 15:13:46 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1861433002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1861433002/100001
4 years, 8 months ago (2016-04-08 15:15:31 UTC) #19
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 8 months ago (2016-04-08 15:21:45 UTC) #21
commit-bot: I haz the power
4 years, 8 months ago (2016-04-08 15:22:52 UTC) #23
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/0c7efcf9ce5d2223c6aba69b94be77da64adea2b
Cr-Commit-Position: refs/heads/master@{#386080}

Powered by Google App Engine
This is Rietveld 408576698