Bug 1346126 - Use RemoveAllChildren in ~ContainerLayerComposite. r=mattwoodrow, a=RyanVM
authorRyan Hunt <rhunt@eqrion.net>
Fri, 01 Jun 2018 11:18:07 -0500
changeset 471183 f7c7f52e469911753c1a3cfa0efaf44df0f3c846
parent 471182 c7746c6e3a3fca035734cbff097de630358f4454
child 471184 f44f50d7b7861dc6c768fd269100e80020f33df8
push id9321
push userryanvm@gmail.com
push dateWed, 06 Jun 2018 17:54:28 +0000
treeherdermozilla-beta@5218dfec0630 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow, RyanVM
bugs1346126
milestone61.0
Bug 1346126 - Use RemoveAllChildren in ~ContainerLayerComposite. r=mattwoodrow, a=RyanVM
gfx/layers/composite/ContainerLayerComposite.cpp
--- a/gfx/layers/composite/ContainerLayerComposite.cpp
+++ b/gfx/layers/composite/ContainerLayerComposite.cpp
@@ -645,19 +645,17 @@ ContainerLayerComposite::~ContainerLayer
   // can be called after remote content has crashed, and it may not be
   // safe to free the IPC resources of our children.  Those resources
   // are automatically cleaned up by IPDL-generated code.
   //
   // In the common case of normal shutdown, either
   // LayerManagerComposite::Destroy(), a parent
   // *ContainerLayerComposite::Destroy(), or Disconnect() will trigger
   // cleanup of our resources.
-  while (mFirstChild) {
-    RemoveChild(mFirstChild);
-  }
+  RemoveAllChildren();
 }
 
 void
 ContainerLayerComposite::Destroy()
 {
   if (!mDestroyed) {
     while (mFirstChild) {
       GetFirstChildComposite()->Destroy();