From 6d8e605a80d54254c9f0db4fde4dd021fe294bb0 Mon Sep 17 00:00:00 2001 From: Andrew Osmond Date: Mon, 11 Sep 2017 18:32:44 -0400 Subject: [PATCH] Bug 1389021 - Explicitly shutdown the CompositorManagerChild during ContentChild::ActorDestroy. r=me It has been observed on nightly and beta that the compositer thread fails to shutdown gracefully due to lingering references. From what can be determined, it appears as if the content process references are what are keeping it alive. The shutdown of CompositorBridgeChild was altered because a top level protocol was added above it in a previous change in bug 1365927. This protocol tree is ultimately what is keeping the thread alive. As such, this patch adds an explicit shutdown of the protocol, to ensure it gets released in a timely manner. This change will be backed out if it appears to have no effect on the crash rate in nightly 57. --- dom/ipc/ContentChild.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dom/ipc/ContentChild.cpp b/dom/ipc/ContentChild.cpp index 93550f61be26..4e1d69b16ee1 100644 --- a/dom/ipc/ContentChild.cpp +++ b/dom/ipc/ContentChild.cpp @@ -2310,6 +2310,8 @@ ContentChild::ActorDestroy(ActorDestroyReason why) } #ifndef NS_FREE_PERMANENT_DATA + CompositorManagerChild::Shutdown(); + // In release builds, there's no point in the content process // going through the full XPCOM shutdown path, because it doesn't // keep persistent state.