Bug 1412081 - Call KillClearOnShutdown(ShutdownPhase::ShutdownFinal) in PluginProcessChild on all platforms r=jimm a=lizzard
authorValentin Gosu <valentin.gosu@gmail.com>
Thu, 05 Jul 2018 17:20:58 +0200
changeset 480580 dd493fc5f6a7c41af31c877c835c1bb9ab777125
parent 480579 5b05309eb9be6bb697665dc9bb86c2b12aa5168b
child 480581 0d79a96597a04bc790193cd296e53848541211d8
push id1757
push userffxbld-merge
push dateFri, 24 Aug 2018 17:02:43 +0000
treeherdermozilla-release@736023aebdb1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjimm, lizzard
bugs1412081
milestone62.0
Bug 1412081 - Call KillClearOnShutdown(ShutdownPhase::ShutdownFinal) in PluginProcessChild on all platforms r=jimm a=lizzard This call gated by ifdef OS_WIN - so on Linux it would leak objects that were supposed to be ClearOnShutdown in the plugin process
dom/plugins/ipc/PluginProcessChild.cpp
--- a/dom/plugins/ipc/PluginProcessChild.cpp
+++ b/dom/plugins/ipc/PluginProcessChild.cpp
@@ -162,15 +162,16 @@ PluginProcessChild::CleanUp()
 #if defined(OS_WIN)
     MOZ_ASSERT(NS_IsMainThread());
 
     // Shutdown components we started in Init.  Note that KillClearOnShutdown
     // is an event that is regularly part of XPCOM shutdown.  We do not
     // call XPCOM's shutdown but we need this event to be sent to avoid
     // leaking objects labeled as ClearOnShutdown.
     nsThreadManager::get().Shutdown();
-    mozilla::KillClearOnShutdown(ShutdownPhase::ShutdownFinal);
     NS_LogTerm();
 #endif
+
+    mozilla::KillClearOnShutdown(ShutdownPhase::ShutdownFinal);
 }
 
 } // namespace plugins
 } // namespace mozilla