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

Issue 2857263003: Task Manager should listen to WebContentsObserver::RenderFrameCreated. (Closed)

Created:
3 years, 7 months ago by Łukasz Anforowicz
Modified:
3 years, 7 months ago
Reviewers:
ncarter (slow)
CC:
chromium-reviews, jam, darin-cc_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Task Manager should listen to WebContentsObserver::RenderFrameCreated. Listening to WebContentsObserver::RenderFrameCreated is the only way to realize that a RenderFrameHost got recreated after a render process crash - Task Manager needs to listen to this callback to re-show frames that were re-navigated after a render process crash. A slight problem with this approach is that the PID of the render process is not necessarily known when RenderFrameCreated is called - to work around that Task Manager postpones processing of the new frame via PostTaskWhenProcessIsReady (an instance method added to RenderProcessHost in this CL). BUG=642958 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation Review-Url: https://codereview.chromium.org/2857263003 Cr-Commit-Position: refs/heads/master@{#472325} Committed: https://chromium.googlesource.com/chromium/src/+/f2c4f1f94d10b019363f2d8c45defe00881cb5cb

Patch Set 1 #

Total comments: 3

Patch Set 2 : . #

Total comments: 5

Patch Set 3 : Make PostTaskWhenProcessIsReady an instance method of RPH. #

Total comments: 14

Patch Set 4 : Addressing the easy part of CR feedback from nick@. #

Patch Set 5 : Avoid calling CreateTaskForFrame twice. #

Patch Set 6 : Don't listen to RenderViewReady, ignore !IsRenderFrameLive, ignore non-current RFHs. #

Patch Set 7 : RenderFrameHost::IsCurrent #

Total comments: 4

Patch Set 8 : Tweaked the comments as suggested in the CR feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+161 lines, -39 lines) Patch
M chrome/browser/task_manager/providers/web_contents/web_contents_task_provider.cc View 1 2 3 4 5 6 7 7 chunks +38 lines, -6 lines 0 comments Download
M chrome/browser/task_manager/task_manager_browsertest.cc View 1 9 chunks +42 lines, -4 lines 0 comments Download
M content/browser/frame_host/render_frame_host_impl.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/frame_host/render_frame_host_impl.cc View 1 2 3 4 5 6 5 chunks +9 lines, -9 lines 0 comments Download
M content/browser/renderer_host/render_process_host_impl.cc View 1 2 3 2 chunks +51 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_view_host_impl.h View 1 2 3 2 chunks +0 lines, -3 lines 0 comments Download
M content/browser/renderer_host/render_view_host_impl.cc View 1 2 3 3 chunks +3 lines, -17 lines 0 comments Download
M content/public/browser/render_frame_host.h View 1 2 3 4 5 6 7 1 chunk +10 lines, -0 lines 0 comments Download
M content/public/browser/render_process_host.h View 1 2 1 chunk +7 lines, -0 lines 0 comments Download

Messages

Total messages: 44 (34 generated)
Łukasz Anforowicz
nick@, could you PTAL? https://codereview.chromium.org/2857263003/diff/1/chrome/browser/task_manager/task_manager_browsertest.cc File chrome/browser/task_manager/task_manager_browsertest.cc (right): https://codereview.chromium.org/2857263003/diff/1/chrome/browser/task_manager/task_manager_browsertest.cc#newcode865 chrome/browser/task_manager/task_manager_browsertest.cc:865: "document.getElementById('frame1').src = '" + b_url.spec() ...
3 years, 7 months ago (2017-05-05 22:01:06 UTC) #8
Łukasz Anforowicz
https://codereview.chromium.org/2857263003/diff/20001/content/public/browser/render_process_host_utils.h File content/public/browser/render_process_host_utils.h (right): https://codereview.chromium.org/2857263003/diff/20001/content/public/browser/render_process_host_utils.h#newcode22 content/public/browser/render_process_host_utils.h:22: base::OnceClosure task); Also - please shout if you think ...
3 years, 7 months ago (2017-05-06 00:16:45 UTC) #11
Łukasz Anforowicz
nick@ - FYI - I've made PostTaskWhenProcessIsReady an instance method of RenderProcessHost as we've discussed ...
3 years, 7 months ago (2017-05-09 23:35:18 UTC) #15
ncarter (slow)
https://codereview.chromium.org/2857263003/diff/20001/chrome/browser/task_manager/task_manager_browsertest.cc File chrome/browser/task_manager/task_manager_browsertest.cc (right): https://codereview.chromium.org/2857263003/diff/20001/chrome/browser/task_manager/task_manager_browsertest.cc#newcode224 chrome/browser/task_manager/task_manager_browsertest.cc:224: ::testing::Values(true)); On 2017/05/05 22:01:06, Łukasz A. wrote: > Having ...
3 years, 7 months ago (2017-05-12 21:56:03 UTC) #18
Łukasz Anforowicz
nick@, can you take another look please? The most important change (I think) is that ...
3 years, 7 months ago (2017-05-16 16:37:25 UTC) #27
ncarter (slow)
lgtm I do think the recursive exploration approach I mentioned suggested would fix some other ...
3 years, 7 months ago (2017-05-16 20:50:57 UTC) #33
ncarter (slow)
On 2017/05/16 20:50:57, ncarter (slow) wrote: > lgtm > > I do think the recursive ...
3 years, 7 months ago (2017-05-16 20:51:38 UTC) #34
Łukasz Anforowicz
Thanks. I'll try to do the WebContentsObserver_FrameObserverAdapter idea in a follow-up CL (starting with adapting/wrapping ...
3 years, 7 months ago (2017-05-16 21:33:44 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/2857263003/140001
3 years, 7 months ago (2017-05-16 21:35:57 UTC) #41
commit-bot: I haz the power
3 years, 7 months ago (2017-05-17 04:36:06 UTC) #44
Message was sent while issue was closed.
Committed patchset #8 (id:140001) as
https://chromium.googlesource.com/chromium/src/+/f2c4f1f94d10b019363f2d8c45de...

Powered by Google App Engine
This is Rietveld 408576698