|
|
Created:
4 years, 2 months ago by dcheng Modified:
4 years, 2 months ago CC:
browser-components-watch_chromium.org, chromium-reviews, creis+watch_chromium.org, darin-cc_chromium.org, estade+watch_chromium.org, feature-media-reviews_chromium.org, gcasto+watchlist_chromium.org, jam, jdonnelly+autofillwatch_chromium.org, mcasas+watch+vc_chromium.org, miu+watch_chromium.org, mlamouri+watch-content_chromium.org, nasko+codewatch_chromium.org, posciak+watch_chromium.org, rouslan+autofill_chromium.org, vabr+watchlistpasswordmanager_chromium.org, vabr+watchlistautofill_chromium.org Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionRename RFO::FrameWillClose() to reflect its actual purpose.
Frame detach and frame close don't really have any relationship. Update
the naming and comments to make this clear.
BUG=472140
Committed: https://crrev.com/dbf1570978e01431602502e73b19ed69d8f503a2
Cr-Commit-Position: refs/heads/master@{#422865}
Patch Set 1 #Patch Set 2 : main frame only #Patch Set 3 : Less crashing #
Total comments: 3
Patch Set 4 : Restore RVO to PageLoadHistograms #
Total comments: 9
Patch Set 5 : Address comments. #Patch Set 6 : Fix silly typo #Messages
Total messages: 48 (29 generated)
The CQ bit was checked by dcheng@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== Rename RFO::FrameWillCLose() to reflect its actual purpose. Frame detach and frame close don't really have any relationship. Update the naming and comments to make this clear. BUG=none ========== to ========== Rename RFO::FrameWillClose() to reflect its actual purpose. Frame detach and frame close don't really have any relationship. Update the naming and comments to make this clear. BUG=none ==========
The CQ bit was checked by dcheng@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Exceeded global retry quota
The CQ bit was checked by dcheng@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== Rename RFO::FrameWillClose() to reflect its actual purpose. Frame detach and frame close don't really have any relationship. Update the naming and comments to make this clear. BUG=none ========== to ========== Rename RFO::FrameWillClose() to reflect its actual purpose. Frame detach and frame close don't really have any relationship. Update the naming and comments to make this clear. BUG=472140 ==========
dcheng@chromium.org changed reviewers: + csharrison@chromium.org, jochen@chromium.org, miu@chromium.org, vabr@chromium.org
+csharrison for chrome/renderer/page_load_histograms.* +vabr for components/autofill +miu for content/renderer/media +jochen for chrome/renderer/chrome_content_renderer_client.*, content/public, and content/renderer/render_frame_impl.* changes. https://codereview.chromium.org/2379293002/diff/40001/chrome/renderer/page_lo... File chrome/renderer/page_load_histograms.cc (right): https://codereview.chromium.org/2379293002/diff/40001/chrome/renderer/page_lo... chrome/renderer/page_load_histograms.cc:542: DCHECK(frame && !frame->parent()); In theory this should always be true. Hopefully the trybots agree. https://codereview.chromium.org/2379293002/diff/40001/chrome/renderer/page_lo... File chrome/renderer/page_load_histograms.h (right): https://codereview.chromium.org/2379293002/diff/40001/chrome/renderer/page_lo... chrome/renderer/page_load_histograms.h:30: void FrameDetached() override; Frame detached should be called before a WebView is closed, so this should be OK. That being said...are there any tests that I can use to verify that this is OK? https://codereview.chromium.org/2379293002/diff/40001/content/public/renderer... File content/public/renderer/render_frame_observer.h (right): https://codereview.chromium.org/2379293002/diff/40001/content/public/renderer... content/public/renderer/render_frame_observer.h:63: virtual void WillCommitProvisionalLoad() {} Looking at how this is used, I think these could all just be folded into DidCommitProvisionalLoad. I'd like to try that in a followup CL, if it makes sense to everyone.
content/renderer/media lgtm
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: 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_androi...)
Unfortunately, it looks like PageLoadHistograms tries to read a bunch of random values off the frame. I'm going to have to think about how to handle this properly: I might just punt on the problem by making it both a RenderFrameObserver and RenderViewObserver, keeping its current dependency on ClosePage() =/
Hi dcheng@, Based on your last update, I'm not sure if you are still asking for review or not. The renaming itself looks good to me for password_autofill_agent.* However, I am confused by the different meaning hinted on by the old and new name of the method. FrameWillClose indicates that it is called every time a frame is closed (with the exception of child frames mentioned in the comment). WillCommitProvisionalLoad sounds like being called only when the frame is replaced due to a navigation. Could you please help me understand this? Cheers, Vaclav
On 2016/09/30 08:17:18, dcheng wrote: > Unfortunately, it looks like PageLoadHistograms tries to read a bunch of random > values off the frame. > > I'm going to have to think about how to handle this properly: I might just punt > on the problem by making it both a RenderFrameObserver and RenderViewObserver, > keeping its current dependency on ClosePage() =/ A while ago I tried to make PageLoadHistograms a RFO and hit the same problem :( I punted on the whole CL. Fortunately we are planning on deleting this entire class soon (see crbug.com/384330)
On 2016/09/30 11:47:51, vabr (Chromium) wrote: > Hi dcheng@, > Based on your last update, I'm not sure if you are still asking for review or > not. The renaming itself looks good to me for password_autofill_agent.* However, > I am confused by the different meaning hinted on by the old and new name of the > method. FrameWillClose indicates that it is called every time a frame is closed > (with the exception of child frames mentioned in the comment). > WillCommitProvisionalLoad sounds like being called only when the frame is > replaced due to a navigation. Could you please help me understand this? > > Cheers, > Vaclav Yes, I am still asking for a review. I'm restructing the PageLoadHistograms portion of the change to make this work, but it will be isolated to that code. As for the naming... the naming is accurate. The old comments were incorrect. There's been no recent functional change in this callback: the comment has just been wrong for a very long time. The password autofill code really just wants to know when a document is going away, which means it needs to listen to WillCommitProvisionalLoad (for navigations) and FrameDetached (for when the entire frame is detached)
On 2016/09/30 12:20:51, Charlie Harrison OOO Sep 28-29 wrote: > On 2016/09/30 08:17:18, dcheng wrote: > > Unfortunately, it looks like PageLoadHistograms tries to read a bunch of > random > > values off the frame. > > > > I'm going to have to think about how to handle this properly: I might just > punt > > on the problem by making it both a RenderFrameObserver and RenderViewObserver, > > keeping its current dependency on ClosePage() =/ > > A while ago I tried to make PageLoadHistograms a RFO and hit the same problem :( > I punted on the whole CL. > > Fortunately we are planning on deleting this entire class soon (see > crbug.com/384330) I'm just going to embed a small RVO inside: removing this method from RVO still seems like an overall win, unless PageLoadHistograms is going to be deleted really really soon now =)
On 2016/09/30 15:30:59, dcheng wrote: > On 2016/09/30 12:20:51, Charlie Harrison OOO Sep 28-29 wrote: > > On 2016/09/30 08:17:18, dcheng wrote: > > > Unfortunately, it looks like PageLoadHistograms tries to read a bunch of > > random > > > values off the frame. > > > > > > I'm going to have to think about how to handle this properly: I might just > > punt > > > on the problem by making it both a RenderFrameObserver and > RenderViewObserver, > > > keeping its current dependency on ClosePage() =/ > > > > A while ago I tried to make PageLoadHistograms a RFO and hit the same problem > :( > > I punted on the whole CL. > > > > Fortunately we are planning on deleting this entire class soon (see > > crbug.com/384330) > > I'm just going to embed a small RVO inside: removing this method from RVO still > seems like an overall win, unless PageLoadHistograms is going to be deleted > really really soon now =) SGTM. We're going to try to delete this class post M55 branch.
On 2016/09/30 15:30:22, dcheng wrote: > On 2016/09/30 11:47:51, vabr (Chromium) wrote: > > Hi dcheng@, > > Based on your last update, I'm not sure if you are still asking for review or > > not. The renaming itself looks good to me for password_autofill_agent.* > However, > > I am confused by the different meaning hinted on by the old and new name of > the > > method. FrameWillClose indicates that it is called every time a frame is > closed > > (with the exception of child frames mentioned in the comment). > > WillCommitProvisionalLoad sounds like being called only when the frame is > > replaced due to a navigation. Could you please help me understand this? > > > > Cheers, > > Vaclav > > Yes, I am still asking for a review. I'm restructing the PageLoadHistograms > portion of the change to make this work, but it will be isolated to that code. > > As for the naming... the naming is accurate. The old comments were incorrect. > There's been no recent functional change in this callback: the comment has just > been wrong for a very long time. The password autofill code really just wants to > know when a document is going away, which means it needs to listen to > WillCommitProvisionalLoad (for navigations) and FrameDetached (for when the > entire frame is detached) Thanks for the explanation! In that case LGTM, having the renaming is good for clarity. And the autofill code indeed observes both WillCommitProvisionalLoad and FrameDetached to detect frames going away, so all looks good.
The CQ bit was checked by dcheng@chromium.org to run a CQ dry run
PTAL, added the RVO
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
https://codereview.chromium.org/2379293002/diff/60001/chrome/renderer/page_lo... File chrome/renderer/page_load_histograms.cc (right): https://codereview.chromium.org/2379293002/diff/60001/chrome/renderer/page_lo... chrome/renderer/page_load_histograms.cc:629: void PageLoadHistograms::Helper::OnDestruct() { Why is this necessary? Might make sense to add a comment. https://codereview.chromium.org/2379293002/diff/60001/chrome/renderer/page_lo... File chrome/renderer/page_load_histograms.h (right): https://codereview.chromium.org/2379293002/diff/60001/chrome/renderer/page_lo... chrome/renderer/page_load_histograms.h:58: // to inherit from both. Embed the RVO in a small helper class instead. "both RVO and RFO"
lgtm with comment https://codereview.chromium.org/2379293002/diff/60001/chrome/renderer/page_lo... File chrome/renderer/page_load_histograms.h (right): https://codereview.chromium.org/2379293002/diff/60001/chrome/renderer/page_lo... chrome/renderer/page_load_histograms.h:61: explicit Helper(PageLoadHistograms* histograms); should there be a virtual dtor as well? https://codereview.chromium.org/2379293002/diff/60001/chrome/renderer/page_lo... chrome/renderer/page_load_histograms.h:70: }; disallow_copy_and_assign
https://codereview.chromium.org/2379293002/diff/60001/chrome/renderer/page_lo... File chrome/renderer/page_load_histograms.cc (right): https://codereview.chromium.org/2379293002/diff/60001/chrome/renderer/page_lo... chrome/renderer/page_load_histograms.cc:629: void PageLoadHistograms::Helper::OnDestruct() { On 2016/09/30 18:56:56, Charlie Harrison wrote: > Why is this necessary? Might make sense to add a comment. RVO defines this as pure virtual? Not sure that I should comment that, since that seems like a property of the RVO interface? https://codereview.chromium.org/2379293002/diff/60001/chrome/renderer/page_lo... File chrome/renderer/page_load_histograms.h (right): https://codereview.chromium.org/2379293002/diff/60001/chrome/renderer/page_lo... chrome/renderer/page_load_histograms.h:58: // to inherit from both. Embed the RVO in a small helper class instead. On 2016/09/30 18:56:56, Charlie Harrison wrote: > "both RVO and RFO" Done. https://codereview.chromium.org/2379293002/diff/60001/chrome/renderer/page_lo... chrome/renderer/page_load_histograms.h:61: explicit Helper(PageLoadHistograms* histograms); On 2016/10/04 09:32:44, jochen (slow) wrote: > should there be a virtual dtor as well? RVO already has a virtual dtor, so it's not necessary to repeat it here. clang (usually) warns if you forget to have a virtual dtor here. https://codereview.chromium.org/2379293002/diff/60001/chrome/renderer/page_lo... chrome/renderer/page_load_histograms.h:70: }; On 2016/10/04 09:32:44, jochen (slow) wrote: > disallow_copy_and_assign Done.
The CQ bit was checked by dcheng@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
LGTM thanks https://codereview.chromium.org/2379293002/diff/60001/chrome/renderer/page_lo... File chrome/renderer/page_load_histograms.cc (right): https://codereview.chromium.org/2379293002/diff/60001/chrome/renderer/page_lo... chrome/renderer/page_load_histograms.cc:629: void PageLoadHistograms::Helper::OnDestruct() { On 2016/10/04 17:16:28, dcheng wrote: > On 2016/09/30 18:56:56, Charlie Harrison wrote: > > Why is this necessary? Might make sense to add a comment. > > RVO defines this as pure virtual? Not sure that I should comment that, since > that seems like a property of the RVO interface? Oops yes that's my mistake.
The CQ bit was unchecked by dcheng@chromium.org
The CQ bit was checked by dcheng@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from vabr@chromium.org, miu@chromium.org, jochen@chromium.org Link to the patchset: https://codereview.chromium.org/2379293002/#ps80001 (title: "Address comments.")
The CQ bit was checked by dcheng@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: chromeos_amd64-generic_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_amd64-...) chromeos_x86-generic_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_x86-ge...) linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by dcheng@chromium.org to run a CQ dry run
The CQ bit was checked by dcheng@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from vabr@chromium.org, jochen@chromium.org, miu@chromium.org, csharrison@chromium.org Link to the patchset: https://codereview.chromium.org/2379293002/#ps100001 (title: "Fix silly typo")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Description was changed from ========== Rename RFO::FrameWillClose() to reflect its actual purpose. Frame detach and frame close don't really have any relationship. Update the naming and comments to make this clear. BUG=472140 ========== to ========== Rename RFO::FrameWillClose() to reflect its actual purpose. Frame detach and frame close don't really have any relationship. Update the naming and comments to make this clear. BUG=472140 ==========
Message was sent while issue was closed.
Committed patchset #6 (id:100001)
Message was sent while issue was closed.
Description was changed from ========== Rename RFO::FrameWillClose() to reflect its actual purpose. Frame detach and frame close don't really have any relationship. Update the naming and comments to make this clear. BUG=472140 ========== to ========== Rename RFO::FrameWillClose() to reflect its actual purpose. Frame detach and frame close don't really have any relationship. Update the naming and comments to make this clear. BUG=472140 Committed: https://crrev.com/dbf1570978e01431602502e73b19ed69d8f503a2 Cr-Commit-Position: refs/heads/master@{#422865} ==========
Message was sent while issue was closed.
Patchset 6 (id:??) landed as https://crrev.com/dbf1570978e01431602502e73b19ed69d8f503a2 Cr-Commit-Position: refs/heads/master@{#422865} |