Bug 1859530 - Remove unused HangMonitorParent fields. r=gsvelto

mBrowserCrashDumpIds and mBrowserCrashDumpHashLock were used to record
NPAPI plugin hangs, but that code is long gone.

Differential Revision: https://phabricator.services.mozilla.com/D192964
This commit is contained in:
Andrew McCreight 2023-11-07 18:27:13 +00:00
parent 6229b6aba7
commit d15bd0078d

View File

@ -300,7 +300,7 @@ class HangMonitorParent : public PProcessHangMonitorParent {
bool IsOnThread() { return mHangMonitor->IsOnThread(); }
private:
~HangMonitorParent() override;
~HangMonitorParent() override = default;
void SendHangNotification(const SlowScriptData& aSlowScriptData,
const nsString& aBrowserDumpId);
@ -331,11 +331,6 @@ class HangMonitorParent : public PProcessHangMonitorParent {
// Must be accessed with mMonitor held.
bool mShutdownDone MOZ_GUARDED_BY(mMonitor);
// Map from plugin ID to crash dump ID. Protected by
// mBrowserCrashDumpHashLock.
nsTHashMap<nsUint32HashKey, nsString> mBrowserCrashDumpIds
MOZ_GUARDED_BY(mMonitor);
Mutex mBrowserCrashDumpHashLock MOZ_GUARDED_BY(mMonitor);
mozilla::ipc::TaskFactory<HangMonitorParent> mMainThreadTaskFactory
MOZ_GUARDED_BY(mMonitor);
};
@ -791,21 +786,10 @@ HangMonitorParent::HangMonitorParent(ProcessHangMonitor* aMonitor)
mIPCOpen(true),
mMonitor("HangMonitorParent lock"),
mShutdownDone(false),
mBrowserCrashDumpHashLock("mBrowserCrashDumpIds lock"),
mMainThreadTaskFactory(this) {
MOZ_RELEASE_ASSERT(NS_IsMainThread());
}
HangMonitorParent::~HangMonitorParent() {
MutexAutoLock lock(mBrowserCrashDumpHashLock);
for (const auto& crashId : mBrowserCrashDumpIds.Values()) {
if (!crashId.IsEmpty()) {
CrashReporter::DeleteMinidumpFilesForID(crashId);
}
}
}
void HangMonitorParent::Shutdown() {
MOZ_RELEASE_ASSERT(NS_IsMainThread());