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

Issue 2544933003: Split methods for ClientHintsPreferences from FrameFetchContext (Closed)

Created:
4 years ago by tyoshino (SeeGerritForStatus)
Modified:
4 years ago
Reviewers:
Yoav Weiss, yhirano
CC:
chromium-reviews, tyoshino+watch_chromium.org, blink-reviews-html_chromium.org, webcomponents-bugzilla_chromium.org, tfarina, sof, eae+blinkwatch, blink-reviews-dom_chromium.org, dglazkov+blink, gavinp+loader_chromium.org, blink-reviews, loading-reviews+fetch_chromium.org, Nate Chapin, loading-reviews_chromium.org, rwlbuis
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Split methods for ClientHintsPreferences from FrameFetchContext FrameFetchContext is containing too many things. We'd like to slim it down to hold basically only things that receive and handle notifications from ResourceFetcher. The methods for ClientHintsPreferences on FrameFetchContext is placed there (I guess) just not to introduce dependencies from core/fetch to core/loader, core/frame, etc. See https://codereview.chromium.org/1189523015 which introduced this logic initially. ---- Compatibility analysis: It's safe to directly pass frame() to FrameClientHintsPreferencesContext in FrameFetchContext::dispatchDidReceiveResponseInternal(). If the passed ResourceFetcher is already clearContext()-ed, we never reach dispatchDidReceiveResponseInternal(). So, we can assume that the ResourceFetcher passed to updateFromAcceptClientHintsHeader() was always not yet clearContext()-ed. HttpEquiv::processHttpEquivAcceptCH() was passing document.fetcher() to updateFromAcceptClientHintsHeader(). Document::m_fetcher is cleared only in Document::shutdown(). Therefore, document.frame() being non-null at the beginning of processHttpEquivAcceptCH() means that the Document hasn't yet shutdown. context().frame() call on document.fetcher() returns document.frame() unless clearContext() was called. This is true even when setImportsController() was called on the Document. This is clarified by a separate CL https://codereview.chromium.org/2547843002/. There're three callers of ResourceFetcher::clearContext(). One of them is Document::shutdown(). So, we don't need to care it. The other cases are: - setImportsController() called by LinkImport::process() while Document::loader() is null - DocumentLoader::detachFromFrame() was called However, I think this behavior was not intended initially and was introduced just accidentally as stated above. R=yhirano@chromium.org BUG=671533 Committed: https://crrev.com/3b099320199a62fcb0e8b66f50e87fd1726c2449 Cr-Commit-Position: refs/heads/master@{#438090}

Patch Set 1 : a #

Total comments: 5

Patch Set 2 : Rebase #

Patch Set 3 : Addressed #21 #

Patch Set 4 : Use Member #

Patch Set 5 : Rebase #

Patch Set 6 : Rebase #

Messages

Total messages: 46 (31 generated)
tyoshino (SeeGerritForStatus)
4 years ago (2016-12-02 10:35:29 UTC) #14
tyoshino (SeeGerritForStatus)
Created a tracking bug for these efforts: http://crbug.com/671533
4 years ago (2016-12-06 08:48:53 UTC) #18
yhirano
> However, I this this behavior was typo?
4 years ago (2016-12-08 07:37:02 UTC) #20
yhirano
https://codereview.chromium.org/2544933003/diff/80001/third_party/WebKit/Source/core/loader/FrameClientHintsPreferencesContext.h File third_party/WebKit/Source/core/loader/FrameClientHintsPreferencesContext.h (right): https://codereview.chromium.org/2544933003/diff/80001/third_party/WebKit/Source/core/loader/FrameClientHintsPreferencesContext.h#newcode15 third_party/WebKit/Source/core/loader/FrameClientHintsPreferencesContext.h:15: class FrameClientHintsPreferencesContext +final https://codereview.chromium.org/2544933003/diff/80001/third_party/WebKit/Source/core/loader/FrameClientHintsPreferencesContext.h#newcode27 third_party/WebKit/Source/core/loader/FrameClientHintsPreferencesContext.h:27: Persistent<Frame> m_frame; I think ...
4 years ago (2016-12-08 07:47:12 UTC) #21
tyoshino (SeeGerritForStatus)
https://codereview.chromium.org/2544933003/diff/80001/third_party/WebKit/Source/core/loader/FrameClientHintsPreferencesContext.h File third_party/WebKit/Source/core/loader/FrameClientHintsPreferencesContext.h (right): https://codereview.chromium.org/2544933003/diff/80001/third_party/WebKit/Source/core/loader/FrameClientHintsPreferencesContext.h#newcode15 third_party/WebKit/Source/core/loader/FrameClientHintsPreferencesContext.h:15: class FrameClientHintsPreferencesContext On 2016/12/08 07:47:12, yhirano wrote: > +final ...
4 years ago (2016-12-09 09:43:24 UTC) #23
tyoshino (SeeGerritForStatus)
On 2016/12/08 07:37:02, yhirano wrote: > > However, I this this behavior was > > ...
4 years ago (2016-12-09 09:43:42 UTC) #24
tyoshino (SeeGerritForStatus)
https://codereview.chromium.org/2544933003/diff/80001/third_party/WebKit/Source/core/loader/FrameClientHintsPreferencesContext.h File third_party/WebKit/Source/core/loader/FrameClientHintsPreferencesContext.h (right): https://codereview.chromium.org/2544933003/diff/80001/third_party/WebKit/Source/core/loader/FrameClientHintsPreferencesContext.h#newcode27 third_party/WebKit/Source/core/loader/FrameClientHintsPreferencesContext.h:27: Persistent<Frame> m_frame; On 2016/12/09 09:43:24, tyoshino wrote: > On ...
4 years ago (2016-12-09 09:46:38 UTC) #26
yhirano
lgtm
4 years ago (2016-12-12 08:39:42 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2544933003/160001
4 years ago (2016-12-12 15:40:09 UTC) #34
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/197166)
4 years ago (2016-12-12 18:23:27 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2544933003/180001
4 years ago (2016-12-13 05:19:12 UTC) #39
Yoav Weiss
On 2016/12/13 05:19:12, commit-bot: I haz the power wrote: > CQ is trying da patch. ...
4 years ago (2016-12-13 06:29:11 UTC) #40
tyoshino (SeeGerritForStatus)
On 2016/12/13 06:29:11, Yoav Weiss wrote: > On 2016/12/13 05:19:12, commit-bot: I haz the power ...
4 years ago (2016-12-13 07:00:41 UTC) #41
commit-bot: I haz the power
Committed patchset #6 (id:180001)
4 years ago (2016-12-13 07:12:26 UTC) #44
commit-bot: I haz the power
4 years ago (2016-12-13 07:15:17 UTC) #46
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/3b099320199a62fcb0e8b66f50e87fd1726c2449
Cr-Commit-Position: refs/heads/master@{#438090}

Powered by Google App Engine
This is Rietveld 408576698