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

Issue 2053233002: Make sure FrameScheduler is cleared when LocalFrame::detach() finishes (Closed)

Created:
4 years, 6 months ago by Xiaocheng
Modified:
4 years, 6 months ago
CC:
chromium-reviews, creis+watch_chromium.org, darin-cc_chromium.org, jam, mkwst+moarreviews-renderer_chromium.org, mlamouri+watch-content_chromium.org, nasko+codewatch_chromium.org, scheduler-bugs_chromium.org, tracing+reviews_chromium.org, wfh+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make sure FrameScheduler is cleared when LocalFrame::detach() finishes This patch is a relanding of https://codereview.chromium.org/1907453002 (Make RenderFrameImpl own its frame blame context) with necessary modification: Since a FrameScheduler may be created in LocalFrame::detach() due to scripting, this patch adds an extra clearing of |m_frameScheduler| to make sure it is cleared. BUG=618599 Committed: https://crrev.com/01c3b106a46f15a7250ce869b294fcc35fe0662f Cr-Commit-Position: refs/heads/master@{#399607}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Use thread checker in BlameContext::weak_ptr() #

Patch Set 3 : (Failed attempt) Introduce and use WebFrameScheduler::setBlameContext #

Patch Set 4 : Use m_useNullBlameContext flag to instruct FrameScheduler #

Patch Set 5 : Make sure FrameScheduler is cleared when LocalFrame::detach() is done #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -3 lines) Patch
M content/renderer/render_frame_impl.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/frame/LocalFrame.cpp View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 30 (9 generated)
Xiaocheng
PTAL. I've also investigated into the use-after-free bug crbug.com/605480 and found the exact cause of ...
4 years, 6 months ago (2016-06-10 05:41:05 UTC) #3
Primiano Tucci (use gerrit)
https://codereview.chromium.org/2053233002/diff/1/components/scheduler/child/single_thread_idle_task_runner.cc File components/scheduler/child/single_thread_idle_task_runner.cc (right): https://codereview.chromium.org/2053233002/diff/1/components/scheduler/child/single_thread_idle_task_runner.cc#newcode87 components/scheduler/child/single_thread_idle_task_runner.cc:87: blame_context_ = blame_context ? blame_context->weak_ptr() : nullptr; how do ...
4 years, 6 months ago (2016-06-10 07:50:35 UTC) #4
Xiaocheng
Thanks for the review. https://codereview.chromium.org/2053233002/diff/1/components/scheduler/child/single_thread_idle_task_runner.cc File components/scheduler/child/single_thread_idle_task_runner.cc (right): https://codereview.chromium.org/2053233002/diff/1/components/scheduler/child/single_thread_idle_task_runner.cc#newcode87 components/scheduler/child/single_thread_idle_task_runner.cc:87: blame_context_ = blame_context ? blame_context->weak_ptr() ...
4 years, 6 months ago (2016-06-10 08:07:08 UTC) #5
Primiano Tucci (use gerrit)
Ok I am probably misunderstanding the goal of this CL. Is the deal here that ...
4 years, 6 months ago (2016-06-10 08:22:32 UTC) #6
Xiaocheng
On 2016/06/10 at 08:22:32, primiano wrote: > Ok I am probably misunderstanding the goal of ...
4 years, 6 months ago (2016-06-10 08:36:07 UTC) #7
Primiano Tucci (use gerrit)
On 2016/06/10 08:36:07, Xiaocheng wrote: > > Does it help if I change the comment ...
4 years, 6 months ago (2016-06-10 08:45:47 UTC) #9
Xiaocheng
On 2016/06/10 at 08:45:47, primiano wrote: > On 2016/06/10 08:36:07, Xiaocheng wrote: > > > ...
4 years, 6 months ago (2016-06-10 08:48:33 UTC) #10
Sami
Your comment in the linked bug made it sound like we were just forgetting to ...
4 years, 6 months ago (2016-06-10 09:16:51 UTC) #11
Xiaocheng
On 2016/06/10 at 09:16:51, skyostil wrote: > Your comment in the linked bug made it ...
4 years, 6 months ago (2016-06-10 09:53:46 UTC) #12
Sami
On 2016/06/10 09:53:46, Xiaocheng wrote: > Well, in some sense, every use-after-free can be understood ...
4 years, 6 months ago (2016-06-10 10:05:11 UTC) #13
Xiaocheng
After some thought I still prefer using WeakPtrs instead of clearing raw pointers manually. I'm ...
4 years, 6 months ago (2016-06-10 14:09:45 UTC) #14
Sami
On 2016/06/10 14:09:45, Xiaocheng wrote: > After some thought I still prefer using WeakPtrs instead ...
4 years, 6 months ago (2016-06-10 16:31:13 UTC) #15
Xiaocheng
On 2016/06/10 at 16:31:13, skyostil wrote: > On 2016/06/10 14:09:45, Xiaocheng wrote: > > After ...
4 years, 6 months ago (2016-06-13 02:29:13 UTC) #16
Xiaocheng
PTAL at Patch 5, which is just a relanding of https://codereview.chromium.org/1907453002/ plus an extra clearing ...
4 years, 6 months ago (2016-06-13 09:15:28 UTC) #21
Sami
Thanks, lgtm.
4 years, 6 months ago (2016-06-13 12:34:17 UTC) #22
jochen (gone - plz use gerrit)
lgtm
4 years, 6 months ago (2016-06-13 15:18:59 UTC) #23
Xiaocheng
Thanks for the comments!
4 years, 6 months ago (2016-06-13 22:45:04 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2053233002/80001
4 years, 6 months ago (2016-06-13 22:45:47 UTC) #26
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 6 months ago (2016-06-13 23:56:20 UTC) #27
commit-bot: I haz the power
CQ bit was unchecked
4 years, 6 months ago (2016-06-13 23:56:28 UTC) #28
commit-bot: I haz the power
4 years, 6 months ago (2016-06-13 23:58:40 UTC) #30
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/01c3b106a46f15a7250ce869b294fcc35fe0662f
Cr-Commit-Position: refs/heads/master@{#399607}

Powered by Google App Engine
This is Rietveld 408576698