Commit 8c3e00e1 authored by Justin Novosad's avatar Justin Novosad Committed by Commit Bot

Fix slow memory leak in CanvasSurfaceLayerBridge

Graphics layers were not getting unregistered so the layer id of
the CanvasSurfaceLayerBridge's web_layer_ was getting leaked.

BUG=735029

Change-Id: If8ab2badba2fc25243834939e9c95d3c9582c3c0
Reviewed-on: https://chromium-review.googlesource.com/541496Reviewed-by: default avatarFernando Serboncini <fserb@chromium.org>
Commit-Queue: Justin Novosad <junov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#480872}
parent 1012b8c2
......@@ -83,6 +83,9 @@ CanvasSurfaceLayerBridge::CanvasSurfaceLayerBridge(
CanvasSurfaceLayerBridge::~CanvasSurfaceLayerBridge() {
observer_ = nullptr;
if (web_layer_) {
GraphicsLayer::UnregisterContentsLayer(web_layer_.get());
}
}
void CanvasSurfaceLayerBridge::CreateSolidColorLayer() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment