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

Issue 2417393002: [Merge M54] aw: Fix effective frame source leak after detach (Closed)

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

Description

[Merge M54] 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 Review-Url: https://codereview.chromium.org/2423473002 Cr-Commit-Position: refs/heads/master@{#425466} (cherry picked from commit 2fd5e46f7fba4945e86a5c4cd9297a6eaf2417df) Committed: https://chromium.googlesource.com/chromium/src/+/56a61bc20d6a87ac2526ab8890b25a8d34973579

Patch Set 1 #

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

Dependent Patchsets:

Messages

Total messages: 2 (1 generated)
boliu
4 years, 2 months ago (2016-10-14 23:52:45 UTC) #2
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
56a61bc20d6a87ac2526ab8890b25a8d34973579.

Powered by Google App Engine
This is Rietveld 408576698