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

Unified Diff: ui/gfx/compositor/compositor_cc.cc

Issue 8772047: Fixes leak/crash in CompositorCC. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/compositor/compositor_cc.cc
diff --git a/ui/gfx/compositor/compositor_cc.cc b/ui/gfx/compositor/compositor_cc.cc
index 3bb4542b495d10678b25c743c57a93f03a1de60f..757381ce7eba6bfb28ccd5e6b41b52e3027cf558 100644
--- a/ui/gfx/compositor/compositor_cc.cc
+++ b/ui/gfx/compositor/compositor_cc.cc
@@ -145,6 +145,10 @@ CompositorCC::CompositorCC(CompositorDelegate* delegate,
}
CompositorCC::~CompositorCC() {
+ // There's a cycle between |root_web_layer_| and |host_|, which results in
+ // leaking and/or crashing. Explicitly set the root layer to NULL so the cycle
+ // is broken.
+ host_.setRootLayer(NULL);
}
void CompositorCC::Initialize(bool use_thread) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698