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

Issue 1743623002: [Experimental Framework] Make the OriginTrialContext a member of ExecutionContext (Closed)

Created:
4 years, 10 months ago by iclelland
Modified:
4 years, 9 months ago
Reviewers:
chasej, sof, jbroman
CC:
blink-reviews, blink-reviews-bindings_chromium.org, blink-reviews-dom_chromium.org, chasej+watch_chromium.org, chromium-reviews, dglazkov+blink, eae+blinkwatch, rwlbuis, sof
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Experimental Framework] Make the OriginTrialContext a supplement to ExecutionContext This patch makes OriginTrialContext a supplement to the ExecutionContext object, rather than being a collection of static methods. This allows us to maintain state on the object, and allows it to be specialized for the different types of execution contexts, so that document contexts can be handled differently than workers, for instance. BUG=582063 Committed: https://crrev.com/c970675cb18a6ba91220d95128dced7b3ffd24b2 Cr-Commit-Position: refs/heads/master@{#379575}

Patch Set 1 #

Patch Set 2 : Fix broken constructor #

Patch Set 3 : Fix for pre-oilpan builds #

Total comments: 17

Patch Set 4 : Avoid changing bindings code for now #

Patch Set 5 : Addressing first round comments from PS#3 #

Total comments: 5

Patch Set 6 : Fix nullptr crash, test that an error message was set #

Total comments: 35

Patch Set 7 : Addressing most of the comments from PS#6 #

Patch Set 8 : Rebase #

Patch Set 9 : Remove reference cycle in DocumentOriginTrialContext #

Patch Set 10 : Use WeakPersistent for Oilpan #

Total comments: 20

Patch Set 11 : Move everything to the oilpan heap, Make OTC a supplement, and streamline tests #

Patch Set 12 : Clean up unused headers #

Total comments: 12

Patch Set 13 : Fixing nits #

Patch Set 14 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+403 lines, -113 lines) Patch
M third_party/WebKit/Source/build/scripts/templates/OriginTrials.cpp.tmpl View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +33 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/build/scripts/templates/OriginTrials.h.tmpl View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +15 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/core.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Document.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Document.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +6 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/ExecutionContext.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/ExecutionContext.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +6 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/origin_trials/DocumentOriginTrialContext.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +41 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/origin_trials/DocumentOriginTrialContext.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +41 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/origin_trials/DocumentOriginTrialContextTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +117 lines, -0 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 2 chunks +22 lines, -11 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 4 chunks +37 lines, -41 lines 0 comments Download
M third_party/WebKit/Source/core/origin_trials/OriginTrialContextTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +63 lines, -51 lines 0 comments Download
M third_party/WebKit/Source/core/testing/NullExecutionContext.h View 2 chunks +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/testing/NullExecutionContext.cpp View 1 2 3 4 2 chunks +9 lines, -1 line 0 comments Download

Dependent Patchsets:

Messages

Total messages: 30 (8 generated)
iclelland
+r chasej
4 years, 10 months ago (2016-02-26 16:51:17 UTC) #2
chasej
https://codereview.chromium.org/1743623002/diff/40001/third_party/WebKit/Source/core/origin_trials/DocumentOriginTrialContext.h File third_party/WebKit/Source/core/origin_trials/DocumentOriginTrialContext.h (right): https://codereview.chromium.org/1743623002/diff/40001/third_party/WebKit/Source/core/origin_trials/DocumentOriginTrialContext.h#newcode28 third_party/WebKit/Source/core/origin_trials/DocumentOriginTrialContext.h:28: Vector<String> getTokensForFeatureName(const String&) override; The getTokensForFeatureName() is an implementation ...
4 years, 10 months ago (2016-02-26 17:57:54 UTC) #3
iclelland
https://codereview.chromium.org/1743623002/diff/40001/third_party/WebKit/Source/core/origin_trials/DocumentOriginTrialContext.h File third_party/WebKit/Source/core/origin_trials/DocumentOriginTrialContext.h (right): https://codereview.chromium.org/1743623002/diff/40001/third_party/WebKit/Source/core/origin_trials/DocumentOriginTrialContext.h#newcode28 third_party/WebKit/Source/core/origin_trials/DocumentOriginTrialContext.h:28: Vector<String> getTokensForFeatureName(const String&) override; On 2016/02/26 17:57:53, chasej wrote: ...
4 years, 9 months ago (2016-02-26 21:15:56 UTC) #4
iclelland
https://codereview.chromium.org/1743623002/diff/40001/third_party/WebKit/Source/core/origin_trials/DocumentOriginTrialContext.h File third_party/WebKit/Source/core/origin_trials/DocumentOriginTrialContext.h (right): https://codereview.chromium.org/1743623002/diff/40001/third_party/WebKit/Source/core/origin_trials/DocumentOriginTrialContext.h#newcode28 third_party/WebKit/Source/core/origin_trials/DocumentOriginTrialContext.h:28: Vector<String> getTokensForFeatureName(const String&) override; On 2016/02/26 21:15:56, iclelland wrote: ...
4 years, 9 months ago (2016-02-29 15:00:22 UTC) #5
iclelland
+r jbroman -- would you be able to take a look at this? Thanks!
4 years, 9 months ago (2016-02-29 18:34:31 UTC) #7
chasej
https://codereview.chromium.org/1743623002/diff/40001/third_party/WebKit/Source/core/origin_trials/OriginTrialContextTest.cpp File third_party/WebKit/Source/core/origin_trials/OriginTrialContextTest.cpp (left): https://codereview.chromium.org/1743623002/diff/40001/third_party/WebKit/Source/core/origin_trials/OriginTrialContextTest.cpp#oldcode222 third_party/WebKit/Source/core/origin_trials/OriginTrialContextTest.cpp:222: EXPECT_TRUE(errorMessage.contains("secure origin")) << "Message should indicate only secure origins ...
4 years, 9 months ago (2016-02-29 18:46:49 UTC) #8
iclelland
https://codereview.chromium.org/1743623002/diff/80001/third_party/WebKit/Source/core/origin_trials/OriginTrialContext.cpp File third_party/WebKit/Source/core/origin_trials/OriginTrialContext.cpp (right): https://codereview.chromium.org/1743623002/diff/80001/third_party/WebKit/Source/core/origin_trials/OriginTrialContext.cpp#newcode54 third_party/WebKit/Source/core/origin_trials/OriginTrialContext.cpp:54: DCHECK(!errorMessage->isEmpty()); On 2016/02/29 18:46:49, chasej wrote: > Need to ...
4 years, 9 months ago (2016-02-29 19:24:04 UTC) #9
jbroman
https://codereview.chromium.org/1743623002/diff/80001/third_party/WebKit/Source/core/origin_trials/DocumentOriginTrialContext.cpp File third_party/WebKit/Source/core/origin_trials/DocumentOriginTrialContext.cpp (right): https://codereview.chromium.org/1743623002/diff/80001/third_party/WebKit/Source/core/origin_trials/DocumentOriginTrialContext.cpp#newcode30 third_party/WebKit/Source/core/origin_trials/DocumentOriginTrialContext.cpp:30: for (HTMLMetaElement* metaElement = head ? Traversal<HTMLMetaElement>::firstChild(*head) : 0; ...
4 years, 9 months ago (2016-02-29 20:41:53 UTC) #10
chasej
https://codereview.chromium.org/1743623002/diff/100001/third_party/WebKit/Source/core/origin_trials/OriginTrialContextTest.cpp File third_party/WebKit/Source/core/origin_trials/OriginTrialContextTest.cpp (right): https://codereview.chromium.org/1743623002/diff/100001/third_party/WebKit/Source/core/origin_trials/OriginTrialContextTest.cpp#newcode231 third_party/WebKit/Source/core/origin_trials/OriginTrialContextTest.cpp:231: nullptr /* errorMessage */); This should call isFeatureEnabledWithoutErrorMessage(), like ...
4 years, 9 months ago (2016-02-29 21:14:47 UTC) #11
sof
https://codereview.chromium.org/1743623002/diff/100001/third_party/WebKit/Source/core/origin_trials/DocumentOriginTrialContext.h File third_party/WebKit/Source/core/origin_trials/DocumentOriginTrialContext.h (right): https://codereview.chromium.org/1743623002/diff/100001/third_party/WebKit/Source/core/origin_trials/DocumentOriginTrialContext.h#newcode35 third_party/WebKit/Source/core/origin_trials/DocumentOriginTrialContext.h:35: RefPtrWillBePersistent<Document> m_parent; On 2016/02/29 20:41:53, jbroman wrote: > Can ...
4 years, 9 months ago (2016-02-29 21:26:24 UTC) #12
iclelland
Thanks for the thorough review, jbroman -- the unit tests were only very roughly split ...
4 years, 9 months ago (2016-03-01 21:51:42 UTC) #13
sof
https://codereview.chromium.org/1743623002/diff/180001/third_party/WebKit/Source/core/origin_trials/DocumentOriginTrialContext.h File third_party/WebKit/Source/core/origin_trials/DocumentOriginTrialContext.h (right): https://codereview.chromium.org/1743623002/diff/180001/third_party/WebKit/Source/core/origin_trials/DocumentOriginTrialContext.h#newcode34 third_party/WebKit/Source/core/origin_trials/DocumentOriginTrialContext.h:34: RawPtrWillBeWeakPersistent<Document> m_parent; Please move DocumentOriginTrialContext to the Oilpan heap ...
4 years, 9 months ago (2016-03-01 21:55:22 UTC) #15
jbroman
Sorry to be a pain, but I'm still having some trouble with this factoring. I ...
4 years, 9 months ago (2016-03-01 23:29:22 UTC) #16
sof
https://codereview.chromium.org/1743623002/diff/180001/third_party/WebKit/Source/core/origin_trials/DocumentOriginTrialContext.h File third_party/WebKit/Source/core/origin_trials/DocumentOriginTrialContext.h (right): https://codereview.chromium.org/1743623002/diff/180001/third_party/WebKit/Source/core/origin_trials/DocumentOriginTrialContext.h#newcode34 third_party/WebKit/Source/core/origin_trials/DocumentOriginTrialContext.h:34: RawPtrWillBeWeakPersistent<Document> m_parent; On 2016/03/01 23:29:21, jbroman wrote: > On ...
4 years, 9 months ago (2016-03-02 12:36:29 UTC) #17
iclelland
On 2016/03/02 12:36:29, sof wrote: > https://codereview.chromium.org/1743623002/diff/180001/third_party/WebKit/Source/core/origin_trials/DocumentOriginTrialContext.h > File third_party/WebKit/Source/core/origin_trials/DocumentOriginTrialContext.h > (right): > > https://codereview.chromium.org/1743623002/diff/180001/third_party/WebKit/Source/core/origin_trials/DocumentOriginTrialContext.h#newcode34 ...
4 years, 9 months ago (2016-03-02 14:41:39 UTC) #18
iclelland
https://codereview.chromium.org/1743623002/diff/180001/third_party/WebKit/Source/core/dom/Document.h File third_party/WebKit/Source/core/dom/Document.h (right): https://codereview.chromium.org/1743623002/diff/180001/third_party/WebKit/Source/core/dom/Document.h#newcode1410 third_party/WebKit/Source/core/dom/Document.h:1410: OwnPtr<DocumentOriginTrialContext> m_originTrialContext; On 2016/03/01 23:29:21, jbroman wrote: > Why ...
4 years, 9 months ago (2016-03-03 21:47:01 UTC) #19
jbroman
lgtm (thanks for bearing with me) Please update the CL description (and add a bug ...
4 years, 9 months ago (2016-03-04 15:23:48 UTC) #20
iclelland
chasej -- can you take one more look at this? Thanks. https://codereview.chromium.org/1743623002/diff/220001/third_party/WebKit/Source/build/scripts/templates/OriginTrials.cpp.tmpl File third_party/WebKit/Source/build/scripts/templates/OriginTrials.cpp.tmpl (right): ...
4 years, 9 months ago (2016-03-07 15:38:37 UTC) #21
chasej
lgtm
4 years, 9 months ago (2016-03-07 17:07:04 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1743623002/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1743623002/260001
4 years, 9 months ago (2016-03-07 17:29:42 UTC) #26
commit-bot: I haz the power
Committed patchset #14 (id:260001)
4 years, 9 months ago (2016-03-07 17:36:33 UTC) #28
commit-bot: I haz the power
4 years, 9 months ago (2016-03-07 17:37:57 UTC) #30
Message was sent while issue was closed.
Patchset 14 (id:??) landed as
https://crrev.com/c970675cb18a6ba91220d95128dced7b3ffd24b2
Cr-Commit-Position: refs/heads/master@{#379575}

Powered by Google App Engine
This is Rietveld 408576698