Bug 1516179 - Unregister ProcessHangMonitor as a hang annotator on shutdown, r=dthayer
authorNika Layzell <nika@thelayzells.com>
Mon, 07 Jan 2019 17:02:59 +0000
changeset 452720 7f9e45f01772c640564c9e488a7ceed477c1f6d3
parent 452719 1ae462ea62d760a6a36e7709dd2b1cd748da7b14
child 452721 42dc31f0985903d0c3a55d18439d52a843c21e3a
push id35328
push userncsoregi@mozilla.com
push dateMon, 07 Jan 2019 21:46:20 +0000
treeherdermozilla-central@14d8f03b496c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdthayer
bugs1516179
milestone66.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1516179 - Unregister ProcessHangMonitor as a hang annotator on shutdown, r=dthayer Differential Revision: https://phabricator.services.mozilla.com/D15614
dom/ipc/ProcessHangMonitor.cpp
--- a/dom/ipc/ProcessHangMonitor.cpp
+++ b/dom/ipc/ProcessHangMonitor.cpp
@@ -355,16 +355,18 @@ void HangMonitorChild::AnnotateHang(Back
     aAnnotations.AddAnnotation(NS_LITERAL_STRING("PaintWhileInterruptingJS"),
                                true);
   }
 }
 
 void HangMonitorChild::Shutdown() {
   MOZ_RELEASE_ASSERT(NS_IsMainThread());
 
+  BackgroundHangMonitor::UnregisterAnnotator(*this);
+
   MonitorAutoLock lock(mMonitor);
   while (!mShutdownDone) {
     mMonitor.Wait();
   }
 }
 
 void HangMonitorChild::ShutdownOnThread() {
   MOZ_RELEASE_ASSERT(IsOnThread());