Bug 951431 - Monitor main thread hangs using BackgroundHangMonitor; r=vladan
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "mozilla/HangMonitor.h"
|
||||
#include "mozilla/BackgroundHangMonitor.h"
|
||||
#include "mozilla/Monitor.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "mozilla/Telemetry.h"
|
||||
@@ -344,6 +345,10 @@ NotifyActivity(ActivityType activityType)
|
||||
}
|
||||
cumulativeUILagMS = 0;
|
||||
}
|
||||
|
||||
if (gThread && !gShutdown) {
|
||||
mozilla::BackgroundHangMonitor().NotifyActivity();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
@@ -354,6 +359,10 @@ Suspend()
|
||||
|
||||
// Because gTimestamp changes this resets the wait count.
|
||||
gTimestamp = PR_INTERVAL_NO_WAIT;
|
||||
|
||||
if (gThread && !gShutdown) {
|
||||
mozilla::BackgroundHangMonitor().NotifyWait();
|
||||
}
|
||||
}
|
||||
|
||||
} } // namespace mozilla::HangMonitor
|
||||
|
||||
Reference in New Issue
Block a user