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

Issue 1531443003: [bindings] Implement an ExperimentEnabled IDL extended attribute. (Closed)

Created:
5 years ago by Daniel Nishi
Modified:
4 years, 11 months ago
Reviewers:
haraken, chasej
CC:
chromium-reviews, blink-reviews, blink-reviews-bindings_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[bindings] Implement an ExperimentEnabled IDL extended attribute. [ExperimentEnabled] acts similarly to [RuntimeEnabled], except the exposure depends on the origin being a secure origin that has a valid key for the experiment. The goal is to support feature detection in JS code. BUG=563563 Committed: https://crrev.com/aa1c4ced03fe5890aa8cd2e330b939ee3accf02a Cr-Commit-Position: refs/heads/master@{#367432}

Patch Set 1 #

Total comments: 17

Patch Set 2 : Less hacky and less lines. #

Total comments: 1

Patch Set 3 : Global generation fix. #

Patch Set 4 : Remove 'return undefined and print a message' on constructors. #

Total comments: 16

Patch Set 5 : #

Patch Set 6 : More sharing. #

Total comments: 2

Patch Set 7 : Install interfaces/attributes/methods unconditionally. Use the generated ExperimentalFeature functi… #

Total comments: 20

Patch Set 8 : Comments addressed. Much less added generations. #

Total comments: 8

Patch Set 9 : Addressing comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1398 lines, -33 lines) Patch
M third_party/WebKit/Source/bindings/IDLExtendedAttributes.txt View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/scripts/code_generator_v8.py View 1 2 3 4 5 6 1 chunk +7 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/bindings/scripts/generate_global_constructors.py View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/scripts/v8_attributes.py View 1 2 3 4 5 6 7 3 chunks +9 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/scripts/v8_interface.py View 1 2 3 4 5 6 7 4 chunks +16 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/bindings/scripts/v8_methods.py View 1 2 3 4 5 6 7 2 chunks +7 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/scripts/v8_utilities.py View 1 2 3 4 5 6 7 2 chunks +33 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/bindings/templates/attributes.cpp View 1 2 3 4 5 6 7 5 chunks +14 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/bindings/templates/constants.cpp View 1 2 3 4 5 6 7 3 chunks +6 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/templates/methods.cpp View 1 2 3 4 5 6 7 2 chunks +4 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/bindings/templates/utilities.cpp View 1 2 3 4 5 6 7 8 1 chunk +19 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/idls/core/TestInterface.idl View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/idls/core/TestObject.idl View 1 2 3 4 5 6 4 chunks +16 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface.cpp View 1 2 3 4 5 6 7 8 95 chunks +762 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.cpp View 1 2 3 4 5 6 7 8 17 chunks +482 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterfacePartial.cpp View 1 2 3 4 5 6 7 8 4 chunks +20 lines, -7 lines 0 comments Download

Messages

Total messages: 36 (9 generated)
Daniel Nishi
+chasej for CC. haraken: PTAL at the bindings changes. Thank you very much!
5 years ago (2015-12-15 20:48:48 UTC) #2
haraken
If we have [ExperimentEnabled] on window.xxx, do we really need to hide the xxx from ...
5 years ago (2015-12-16 02:16:42 UTC) #3
Daniel Nishi
chasej@: I've added a method to experiments.h which doesn't require an error message string, in ...
5 years ago (2015-12-16 21:42:03 UTC) #6
haraken
On 2015/12/16 21:42:03, Daniel Nishi wrote: > chasej@: I've added a method to experiments.h which ...
5 years ago (2015-12-17 01:05:30 UTC) #7
Daniel Nishi
This patch removes the case of "return undefined, but the field still exists." https://codereview.chromium.org/1531443003/diff/100001/third_party/WebKit/Source/bindings/templates/interface_base.cpp File ...
5 years ago (2015-12-18 01:23:23 UTC) #9
haraken
https://codereview.chromium.org/1531443003/diff/100001/third_party/WebKit/Source/bindings/IDLExtendedAttributes.txt File third_party/WebKit/Source/bindings/IDLExtendedAttributes.txt (right): https://codereview.chromium.org/1531443003/diff/100001/third_party/WebKit/Source/bindings/IDLExtendedAttributes.txt#newcode37 third_party/WebKit/Source/bindings/IDLExtendedAttributes.txt:37: APIExperimentEnabled=* Alphabetical order. https://codereview.chromium.org/1531443003/diff/100001/third_party/WebKit/Source/bindings/scripts/v8_attributes.py File third_party/WebKit/Source/bindings/scripts/v8_attributes.py (right): https://codereview.chromium.org/1531443003/diff/100001/third_party/WebKit/Source/bindings/scripts/v8_attributes.py#newcode509 third_party/WebKit/Source/bindings/scripts/v8_attributes.py:509: ...
5 years ago (2015-12-18 02:35:52 UTC) #10
Daniel Nishi
Thanks a ton for the quick review. Please take another look when you get a ...
5 years ago (2015-12-18 05:11:42 UTC) #11
haraken
https://codereview.chromium.org/1531443003/diff/100001/third_party/WebKit/Source/bindings/templates/methods.cpp File third_party/WebKit/Source/bindings/templates/methods.cpp (right): https://codereview.chromium.org/1531443003/diff/100001/third_party/WebKit/Source/bindings/templates/methods.cpp#newcode421 third_party/WebKit/Source/bindings/templates/methods.cpp:421: method.api_experiment_name) %} On 2015/12/18 05:11:42, Daniel Nishi wrote: > ...
5 years ago (2015-12-18 05:20:03 UTC) #12
Daniel Nishi
On 2015/12/18 05:20:03, haraken wrote: > https://codereview.chromium.org/1531443003/diff/100001/third_party/WebKit/Source/bindings/templates/methods.cpp > File third_party/WebKit/Source/bindings/templates/methods.cpp (right): > > https://codereview.chromium.org/1531443003/diff/100001/third_party/WebKit/Source/bindings/templates/methods.cpp#newcode421 > ...
5 years ago (2015-12-18 17:56:39 UTC) #13
haraken
On 2015/12/18 17:56:39, Daniel Nishi wrote: > On 2015/12/18 05:20:03, haraken wrote: > > > ...
5 years ago (2015-12-19 10:02:02 UTC) #14
Daniel Nishi
I understand. I've changed the patch to no use an additional filter and re-use more ...
5 years ago (2015-12-21 21:20:04 UTC) #15
haraken
Thanks for the update. One question (I should have noticed this earlier...): installDOMClassTemplate installs DOM ...
5 years ago (2015-12-21 23:46:33 UTC) #16
Daniel Nishi
On 2015/12/21 23:46:33, haraken wrote: > Thanks for the update. > > One question (I ...
5 years ago (2015-12-22 00:16:55 UTC) #17
haraken
On 2015/12/22 00:16:55, Daniel Nishi wrote: > On 2015/12/21 23:46:33, haraken wrote: > > Thanks ...
5 years ago (2015-12-22 01:23:55 UTC) #18
haraken
On 2015/12/22 01:23:55, haraken wrote: > On 2015/12/22 00:16:55, Daniel Nishi wrote: > > On ...
5 years ago (2015-12-22 01:24:58 UTC) #19
chasej
https://codereview.chromium.org/1531443003/diff/140001/third_party/WebKit/Source/core/experiments/Experiments.h File third_party/WebKit/Source/core/experiments/Experiments.h (right): https://codereview.chromium.org/1531443003/diff/140001/third_party/WebKit/Source/core/experiments/Experiments.h#newcode28 third_party/WebKit/Source/core/experiments/Experiments.h:28: static bool isApiEnabled(ExecutionContext*, const String& apiName); Makes sense to ...
5 years ago (2015-12-22 16:58:26 UTC) #20
Daniel Nishi
On 2015/12/22 01:23:55, haraken wrote: > On 2015/12/22 00:16:55, Daniel Nishi wrote: > > On ...
5 years ago (2015-12-22 18:25:51 UTC) #21
haraken
On 2015/12/22 18:25:51, Daniel Nishi wrote: > On 2015/12/22 01:23:55, haraken wrote: > > On ...
4 years, 12 months ago (2015-12-28 03:03:02 UTC) #22
Daniel Nishi
Okay, there are some significant changes. 1. We are now unconditionally installing the experimental attributes/methods/constants/etc. ...
4 years, 11 months ago (2015-12-30 00:01:27 UTC) #24
haraken
Thanks for the update! We're getting pretty close. Mostly LG. https://codereview.chromium.org/1531443003/diff/180001/third_party/WebKit/Source/bindings/scripts/v8_attributes.py File third_party/WebKit/Source/bindings/scripts/v8_attributes.py (right): https://codereview.chromium.org/1531443003/diff/180001/third_party/WebKit/Source/bindings/scripts/v8_attributes.py#newcode108 ...
4 years, 11 months ago (2015-12-30 00:25:33 UTC) #25
Daniel Nishi
https://codereview.chromium.org/1531443003/diff/180001/third_party/WebKit/Source/bindings/scripts/v8_attributes.py File third_party/WebKit/Source/bindings/scripts/v8_attributes.py (right): https://codereview.chromium.org/1531443003/diff/180001/third_party/WebKit/Source/bindings/scripts/v8_attributes.py#newcode108 third_party/WebKit/Source/bindings/scripts/v8_attributes.py:108: 'api_experiment_enabled': v8_utilities.api_experiment_enabled_function(attribute), # [APIExperimentEnabled] On 2015/12/30 00:25:32, haraken wrote: ...
4 years, 11 months ago (2015-12-30 22:05:50 UTC) #28
haraken
Mostly look good. The final round of comments... https://codereview.chromium.org/1531443003/diff/240001/third_party/WebKit/Source/bindings/scripts/v8_attributes.py File third_party/WebKit/Source/bindings/scripts/v8_attributes.py (right): https://codereview.chromium.org/1531443003/diff/240001/third_party/WebKit/Source/bindings/scripts/v8_attributes.py#newcode520 third_party/WebKit/Source/bindings/scripts/v8_attributes.py:520: context['needs_constructor_getter_callback'] ...
4 years, 11 months ago (2015-12-31 12:47:22 UTC) #29
Daniel Nishi
https://codereview.chromium.org/1531443003/diff/240001/third_party/WebKit/Source/bindings/scripts/v8_attributes.py File third_party/WebKit/Source/bindings/scripts/v8_attributes.py (right): https://codereview.chromium.org/1531443003/diff/240001/third_party/WebKit/Source/bindings/scripts/v8_attributes.py#newcode520 third_party/WebKit/Source/bindings/scripts/v8_attributes.py:520: context['needs_constructor_getter_callback'] = context['measure_as'] or context['deprecate_as'] or context['api_experiment_name'] On 2015/12/31 ...
4 years, 11 months ago (2016-01-04 18:56:32 UTC) #30
haraken
Thanks, LGTM
4 years, 11 months ago (2016-01-05 00:34:02 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1531443003/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1531443003/260001
4 years, 11 months ago (2016-01-05 00:40:55 UTC) #33
commit-bot: I haz the power
Committed patchset #9 (id:260001)
4 years, 11 months ago (2016-01-05 00:48:10 UTC) #34
commit-bot: I haz the power
4 years, 11 months ago (2016-01-05 00:49:10 UTC) #36
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/aa1c4ced03fe5890aa8cd2e330b939ee3accf02a
Cr-Commit-Position: refs/heads/master@{#367432}

Powered by Google App Engine
This is Rietveld 408576698