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

Issue 2642103002: Move ImageLoader timer to frame-specific TaskRunnerTimer. (Closed)

Created:
3 years, 11 months ago by Byoungkwon Ko
Modified:
3 years, 11 months ago
Reviewers:
haraken
CC:
chromium-reviews, blink-reviews, loading-reviews_chromium.org, tyoshino+watch_chromium.org, Nate Chapin, gavinp+loader_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Move ImageLoader timer to frame-specific TaskRunnerTimer. Move ImageLoader timer m_derefElementTimer to frame-specific TaskRunnerTimer. This associates it with the frame's Networking timer task queue. BUG=624694 Review-Url: https://codereview.chromium.org/2642103002 Cr-Commit-Position: refs/heads/master@{#444927} Committed: https://chromium.googlesource.com/chromium/src/+/ce1a9c0e454b08c96ca73788a1b4dccb405ce027

Patch Set 1 #

Patch Set 2 : Move ImageLoader timer to frame-specific TaskRunnerTimer. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -2 lines) Patch
M third_party/WebKit/Source/core/loader/ImageLoader.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/loader/ImageLoader.cpp View 1 2 chunks +5 lines, -1 line 0 comments Download

Messages

Total messages: 20 (13 generated)
Byoungkwon Ko
PTAL
3 years, 11 months ago (2017-01-19 19:30:13 UTC) #8
haraken
LGTM
3 years, 11 months ago (2017-01-20 01:12:33 UTC) #12
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/2642103002/20001
3 years, 11 months ago (2017-01-20 01:18:22 UTC) #14
commit-bot: I haz the power
Committed patchset #2 (id:20001) as https://chromium.googlesource.com/chromium/src/+/ce1a9c0e454b08c96ca73788a1b4dccb405ce027
3 years, 11 months ago (2017-01-20 01:39:13 UTC) #17
haraken
A revert of this CL (patchset #2 id:20001) has been created in https://codereview.chromium.org/2644933003/ by haraken@chromium.org. ...
3 years, 11 months ago (2017-01-20 07:31:07 UTC) #18
haraken
On 2017/01/20 07:31:07, haraken wrote: > A revert of this CL (patchset #2 id:20001) has ...
3 years, 11 months ago (2017-01-20 07:33:18 UTC) #19
haraken
3 years, 11 months ago (2017-01-20 09:43:24 UTC) #20
Message was sent while issue was closed.
On 2017/01/20 07:33:18, haraken wrote:
> On 2017/01/20 07:31:07, haraken wrote:
> > A revert of this CL (patchset #2 id:20001) has been created in
> > https://codereview.chromium.org/2644933003/ by mailto:haraken@chromium.org.
> > 
> > The reason for reverting is: To the best of my knowledge, I guess this CL is
> > going to be a culprit of the memory leak:
> > 
> >
>
https://build.chromium.org/p/chromium.webkit/builders/WebKit%20Linux%20Trusty...
> > 
> > Let me revert this CL and see how it goes. I'll reland it if my guess is
> wrong.
> > .
> 
> I think the memory leak is related to
> https://codereview.chromium.org/2642863002/

This is hitting the same problem as https://codereview.chromium.org/2642863002/.

Given that timerFired() may not be called, we need to call m_keepAlive.clear()
when the frame gets detached. You can do that by inheriting from
ContextLifecycleObserver and call m_keepAlive.clear() in
ContextLifecycleObserver::contextDestroyed().

However, it's error-prone that developers have to assume that timers may not
run. I'm discussing how to deal with this issue in
https://codereview.chromium.org/2642863002/.

(BTW, I noticed that this task should use UnspecedTimer, not Networking.
m_keepAlive.clear() is definitely an internal task.)

Powered by Google App Engine
This is Rietveld 408576698