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

Issue 2423473002: aw: Fix effective frame source leak after detach (Closed)

Created:
4 years, 2 months ago by boliu
Modified:
4 years, 2 months ago
Reviewers:
jbauman
CC:
chromium-reviews, android-webview-reviews_chromium.org, Shouqun
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

aw: Fix effective frame source leak after detach shouqun@ discovered that destroying the SurfaceFactory before all resources belonging to that surface are returned will lead to those resources being dropped completely, since cc::Display only holds onto a weakptr to SurfaceFactory to return resources. Webview goes through this cycle each time it's detached and re-attached, so the "lost" resources will keep growing until the memory budget is reached. Note though that destroying the webview does free these resources, so they are not lost forever. But detach/attach is very common, and this is still a severe leak. Fix by submitting an empty frame into the Surface, which forces resources from the previous frame to be returned. BUG=655434 Committed: https://crrev.com/2fd5e46f7fba4945e86a5c4cd9297a6eaf2417df Cr-Commit-Position: refs/heads/master@{#425466}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+8 lines, -0 lines) Patch
M android_webview/browser/hardware_renderer.cc View 1 chunk +8 lines, -0 lines 0 comments Download

Messages

Total messages: 14 (7 generated)
boliu
ptal
4 years, 2 months ago (2016-10-14 17:38:17 UTC) #3
boliu
cc shouqun
4 years, 2 months ago (2016-10-14 17:44:15 UTC) #5
jbauman
lgtm
4 years, 2 months ago (2016-10-14 21:09:08 UTC) #8
boliu
On 2016/10/14 21:09:08, jbauman wrote: > lgtm Thanks!
4 years, 2 months ago (2016-10-14 21:09:58 UTC) #9
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/2423473002/1
4 years, 2 months ago (2016-10-14 21:10:47 UTC) #11
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 2 months ago (2016-10-14 21:20:04 UTC) #12
commit-bot: I haz the power
4 years, 2 months ago (2016-10-14 21:21:44 UTC) #14
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/2fd5e46f7fba4945e86a5c4cd9297a6eaf2417df
Cr-Commit-Position: refs/heads/master@{#425466}

Powered by Google App Engine
This is Rietveld 408576698