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

Issue 2005433002: [Origin Trials] Install origin trial bindings on V8 context conditionally (Closed)

Created:
4 years, 7 months ago by iclelland
Modified:
4 years, 6 months ago
Reviewers:
haraken, chasej, Rick Byers, Yuki
CC:
chromium-reviews, chasej+watch_chromium.org, falken, kinuko+worker_chromium.org, blink-reviews-bindings_chromium.org, blink-reviews, horo+watch_chromium.org, blink-worker-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@track-ef-install
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Origin Trials] Install origin trial bindings on V8 context conditionally This patch removes the call-time check for origin-trial-enabled features, replacing it with code that installs features into the V8 context as trial tokens are encountered. This means that experimental features which were previously polluting the global namespaces are now completely unavailable except when enabled by origin trials. (The specific case of pollution caused by Durable Storage is removed from test expectations in this patch) Origin trials are now initialized after the V8 context, by calling initializeOriginTrials. This calls, through a series of function pointers, the bindings initialization code for core, modules, and optionally internals (for tests). This patch implements the design at https://docs.google.com/document/d/1vwKD8sUrr5mtktvEwvO_f2KUsNhpcgLMixYXhD8K4KY BUG=584367 Committed: https://crrev.com/e3f3c54cae7eea91719344411dbfe89a717f2e9f Cr-Commit-Position: refs/heads/master@{#396860}

Patch Set 1 #

Patch Set 2 : Initialize Durable Storage as an origin trial #

Patch Set 3 : Change navigator.storage from RuntimeEnabled to OriginTrialEnabled #

Total comments: 4

Patch Set 4 : Fix spelling of sample API feature name #

Patch Set 5 : Assert that [OriginTrialEnabled] and static are incompatible for now #

Patch Set 6 : Rebase; Respect runtime-enabled flags as well #

Patch Set 7 : Fixing test failures; correctly installing interfaces #

Patch Set 8 : Addressing comments from PS#3 #

Patch Set 9 : Clean up #

Total comments: 33

Patch Set 10 : Switch to using ScriptState instead of explicit context/world #

Total comments: 8

Patch Set 11 : Clean up, use Yuki's method to define interface objects #

Total comments: 4

Patch Set 12 : Fix comments, Re-apply v8 enumerable/configurable/rw attributes to descriptor #

Total comments: 7

Patch Set 13 : Addressing review comments #

Total comments: 6

Patch Set 14 : Fix multiple definition of signature; addressing nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+309 lines, -144 lines) Patch
M third_party/WebKit/LayoutTests/virtual/stable/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt View 1 2 3 4 5 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/virtual/stable/webexposed/global-interface-listing-dedicated-worker-expected.txt View 1 2 3 4 5 2 chunks +0 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/virtual/stable/webexposed/global-interface-listing-expected.txt View 1 2 3 4 5 6 3 chunks +0 lines, -3 lines 0 comments Download
M third_party/WebKit/LayoutTests/virtual/stable/webexposed/global-interface-listing-shared-worker-expected.txt View 1 2 3 4 5 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/V8Binding.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +16 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +26 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +11 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +9 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/modules/v8/ModuleBindingsInitializer.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/modules/v8/V8BindingForModules.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/modules/v8/V8BindingForModules.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +48 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/scripts/v8_attributes.py View 1 2 3 4 5 6 7 8 9 10 5 chunks +18 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/scripts/v8_utilities.py View 1 2 3 4 5 6 7 8 9 10 2 chunks +8 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/templates/attributes.cpp View 1 2 3 4 5 6 7 8 9 10 5 chunks +1 line, -13 lines 0 comments Download
M third_party/WebKit/Source/bindings/templates/constants.cpp View 2 chunks +0 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/bindings/templates/interface.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +6 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/templates/interface_base.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +23 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/templates/methods.cpp View 1 2 3 4 5 6 7 8 9 10 2 chunks +1 line, -4 lines 0 comments Download
M third_party/WebKit/Source/bindings/templates/partial_interface.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +6 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceOriginTrialEnabled.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 11 chunks +13 lines, -110 lines 0 comments Download
M third_party/WebKit/Source/core/origin_trials/OriginTrialContext.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +7 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/origin_trials/OriginTrialContext.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +40 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/testing/v8/WebCoreTestSupport.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/testing/v8/WebCoreTestSupport.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +52 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/workers/WorkerThread.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +12 lines, -1 line 0 comments Download

Messages

Total messages: 41 (12 generated)
iclelland
chasej, can you take a preliminary look? There is still some work to do on ...
4 years, 7 months ago (2016-05-20 18:25:53 UTC) #3
chasej
Looking pretty good so far. It would help to link to the design doc in ...
4 years, 7 months ago (2016-05-20 20:18:14 UTC) #4
iclelland
Description updated as well. https://codereview.chromium.org/2005433002/diff/40001/third_party/WebKit/Source/bindings/modules/v8/V8BindingForModules.cpp File third_party/WebKit/Source/bindings/modules/v8/V8BindingForModules.cpp (right): https://codereview.chromium.org/2005433002/diff/40001/third_party/WebKit/Source/bindings/modules/v8/V8BindingForModules.cpp#newcode560 third_party/WebKit/Source/bindings/modules/v8/V8BindingForModules.cpp:560: if (originTrialContext->isFeatureEnabled("DurableStorage", nullptr) && !originTrialContext->featureBindingsInstalled("DurableStorage")) ...
4 years, 7 months ago (2016-05-26 17:09:22 UTC) #6
iclelland
+r haraken -- Can you PTAL at this? Thanks!
4 years, 7 months ago (2016-05-26 18:24:26 UTC) #9
haraken
https://codereview.chromium.org/2005433002/diff/160001/third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp File third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp (right): https://codereview.chromium.org/2005433002/diff/160001/third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp#newcode821 third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp:821: void initializeOriginTrialsCore(v8::Local<v8::Context> context, const DOMWrapperWorld& world) Who calls this ...
4 years, 7 months ago (2016-05-27 00:01:43 UTC) #10
iclelland
Thanks for the quick review! I think I've explained everything in comments, but please ask ...
4 years, 7 months ago (2016-05-27 03:19:43 UTC) #11
Yuki
https://codereview.chromium.org/2005433002/diff/160001/third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp File third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp (right): https://codereview.chromium.org/2005433002/diff/160001/third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp#newcode64 third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp:64: void installAttributeInternal(v8::Isolate* isolate, v8::Local<v8::Object> instance, v8::Local<v8::Object> prototype, const V8DOMConfiguration::AttributeConfiguration& ...
4 years, 7 months ago (2016-05-27 09:59:42 UTC) #13
iclelland
https://codereview.chromium.org/2005433002/diff/160001/third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp File third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp (right): https://codereview.chromium.org/2005433002/diff/160001/third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp#newcode64 third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp:64: void installAttributeInternal(v8::Isolate* isolate, v8::Local<v8::Object> instance, v8::Local<v8::Object> prototype, const V8DOMConfiguration::AttributeConfiguration& ...
4 years, 6 months ago (2016-05-27 13:51:27 UTC) #14
Yuki
https://codereview.chromium.org/2005433002/diff/160001/third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp File third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp (right): https://codereview.chromium.org/2005433002/diff/160001/third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp#newcode64 third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp:64: void installAttributeInternal(v8::Isolate* isolate, v8::Local<v8::Object> instance, v8::Local<v8::Object> prototype, const V8DOMConfiguration::AttributeConfiguration& ...
4 years, 6 months ago (2016-05-27 15:09:42 UTC) #15
iclelland
https://codereview.chromium.org/2005433002/diff/160001/third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp File third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp (right): https://codereview.chromium.org/2005433002/diff/160001/third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp#newcode64 third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp:64: void installAttributeInternal(v8::Isolate* isolate, v8::Local<v8::Object> instance, v8::Local<v8::Object> prototype, const V8DOMConfiguration::AttributeConfiguration& ...
4 years, 6 months ago (2016-05-27 15:27:01 UTC) #16
haraken
https://codereview.chromium.org/2005433002/diff/160001/third_party/WebKit/Source/bindings/templates/interface_base.cpp File third_party/WebKit/Source/bindings/templates/interface_base.cpp (right): https://codereview.chromium.org/2005433002/diff/160001/third_party/WebKit/Source/bindings/templates/interface_base.cpp#newcode371 third_party/WebKit/Source/bindings/templates/interface_base.cpp:371: void {{v8_class_or_partial}}::install{{group.grouper}}(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::Object> instance, v8::Local<v8::Function> ...
4 years, 6 months ago (2016-05-27 22:25:17 UTC) #17
Yuki
https://codereview.chromium.org/2005433002/diff/160001/third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp File third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp (right): https://codereview.chromium.org/2005433002/diff/160001/third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp#newcode64 third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp:64: void installAttributeInternal(v8::Isolate* isolate, v8::Local<v8::Object> instance, v8::Local<v8::Object> prototype, const V8DOMConfiguration::AttributeConfiguration& ...
4 years, 6 months ago (2016-05-30 08:14:20 UTC) #18
iclelland
https://codereview.chromium.org/2005433002/diff/160001/third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp File third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp (right): https://codereview.chromium.org/2005433002/diff/160001/third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp#newcode64 third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp:64: void installAttributeInternal(v8::Isolate* isolate, v8::Local<v8::Object> instance, v8::Local<v8::Object> prototype, const V8DOMConfiguration::AttributeConfiguration& ...
4 years, 6 months ago (2016-05-30 12:15:35 UTC) #19
Yuki
https://codereview.chromium.org/2005433002/diff/160001/third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp File third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp (right): https://codereview.chromium.org/2005433002/diff/160001/third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp#newcode64 third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp:64: void installAttributeInternal(v8::Isolate* isolate, v8::Local<v8::Object> instance, v8::Local<v8::Object> prototype, const V8DOMConfiguration::AttributeConfiguration& ...
4 years, 6 months ago (2016-05-30 13:07:58 UTC) #20
iclelland
https://codereview.chromium.org/2005433002/diff/160001/third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp File third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp (right): https://codereview.chromium.org/2005433002/diff/160001/third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp#newcode64 third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp:64: void installAttributeInternal(v8::Isolate* isolate, v8::Local<v8::Object> instance, v8::Local<v8::Object> prototype, const V8DOMConfiguration::AttributeConfiguration& ...
4 years, 6 months ago (2016-05-30 15:07:47 UTC) #21
iclelland
https://codereview.chromium.org/2005433002/diff/160001/third_party/WebKit/Source/core/testing/v8/WebCoreTestSupport.cpp File third_party/WebKit/Source/core/testing/v8/WebCoreTestSupport.cpp (right): https://codereview.chromium.org/2005433002/diff/160001/third_party/WebKit/Source/core/testing/v8/WebCoreTestSupport.cpp#newcode85 third_party/WebKit/Source/core/testing/v8/WebCoreTestSupport.cpp:85: void initializeOriginTrialsForTests(v8::Local<v8::Context> context, const blink::DOMWrapperWorld& world) On 2016/05/27 22:25:17, ...
4 years, 6 months ago (2016-05-30 15:39:28 UTC) #23
haraken
LGTM on my side. https://codereview.chromium.org/2005433002/diff/200001/third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp File third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp (right): https://codereview.chromium.org/2005433002/diff/200001/third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp#newcode75 third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp:75: // an attribute conguration for ...
4 years, 6 months ago (2016-05-31 00:16:32 UTC) #24
iclelland
https://codereview.chromium.org/2005433002/diff/200001/third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp File third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp (right): https://codereview.chromium.org/2005433002/diff/200001/third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp#newcode75 third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp:75: // an attribute conguration for a constructor. On 2016/05/31 ...
4 years, 6 months ago (2016-05-31 03:17:31 UTC) #25
Yuki
https://codereview.chromium.org/2005433002/diff/220001/third_party/WebKit/Source/bindings/core/v8/V8Binding.h File third_party/WebKit/Source/bindings/core/v8/V8Binding.h (right): https://codereview.chromium.org/2005433002/diff/220001/third_party/WebKit/Source/bindings/core/v8/V8Binding.h#newcode72 third_party/WebKit/Source/bindings/core/v8/V8Binding.h:72: using installOriginTrialsFunction = void (*)(ScriptState*); Type name should starts ...
4 years, 6 months ago (2016-05-31 05:05:32 UTC) #26
iclelland
https://codereview.chromium.org/2005433002/diff/220001/third_party/WebKit/Source/bindings/core/v8/V8Binding.h File third_party/WebKit/Source/bindings/core/v8/V8Binding.h (right): https://codereview.chromium.org/2005433002/diff/220001/third_party/WebKit/Source/bindings/core/v8/V8Binding.h#newcode72 third_party/WebKit/Source/bindings/core/v8/V8Binding.h:72: using installOriginTrialsFunction = void (*)(ScriptState*); On 2016/05/31 05:05:32, Yuki ...
4 years, 6 months ago (2016-05-31 05:34:52 UTC) #27
Yuki
LGTM on my side, too.
4 years, 6 months ago (2016-05-31 05:38:25 UTC) #28
iclelland
+r rbyers for the cleanup in the webexposed test expectations
4 years, 6 months ago (2016-05-31 12:31:11 UTC) #30
Rick Byers
On 2016/05/31 12:31:11, iclelland wrote: > +r rbyers for the cleanup in the webexposed test ...
4 years, 6 months ago (2016-05-31 12:50:13 UTC) #31
chasej
https://codereview.chromium.org/2005433002/diff/240001/third_party/WebKit/Source/bindings/core/v8/V8Binding.h File third_party/WebKit/Source/bindings/core/v8/V8Binding.h (right): https://codereview.chromium.org/2005433002/diff/240001/third_party/WebKit/Source/bindings/core/v8/V8Binding.h#newcode869 third_party/WebKit/Source/bindings/core/v8/V8Binding.h:869: // installd, but may be called multiple times, as ...
4 years, 6 months ago (2016-05-31 15:42:13 UTC) #32
iclelland
https://codereview.chromium.org/2005433002/diff/240001/third_party/WebKit/Source/bindings/core/v8/V8Binding.h File third_party/WebKit/Source/bindings/core/v8/V8Binding.h (right): https://codereview.chromium.org/2005433002/diff/240001/third_party/WebKit/Source/bindings/core/v8/V8Binding.h#newcode869 third_party/WebKit/Source/bindings/core/v8/V8Binding.h:869: // installd, but may be called multiple times, as ...
4 years, 6 months ago (2016-05-31 16:03:44 UTC) #33
chasej
LGTM.
4 years, 6 months ago (2016-05-31 16:14:31 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2005433002/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2005433002/260001
4 years, 6 months ago (2016-05-31 17:35:00 UTC) #37
commit-bot: I haz the power
Committed patchset #14 (id:260001)
4 years, 6 months ago (2016-05-31 18:04:41 UTC) #39
commit-bot: I haz the power
4 years, 6 months ago (2016-05-31 18:06:28 UTC) #41
Message was sent while issue was closed.
Patchset 14 (id:??) landed as
https://crrev.com/e3f3c54cae7eea91719344411dbfe89a717f2e9f
Cr-Commit-Position: refs/heads/master@{#396860}

Powered by Google App Engine
This is Rietveld 408576698