diff --git a/dom/ipc/ContentParent.cpp b/dom/ipc/ContentParent.cpp index 4ef068af978d..ec3bfdf0562c 100644 --- a/dom/ipc/ContentParent.cpp +++ b/dom/ipc/ContentParent.cpp @@ -3438,7 +3438,9 @@ ContentParent::GeneratePairedMinidump(const char* aReason) // Something has gone wrong to get us here, so we generate a minidump // of the parent and child for submission to the crash server unless we're // already shutting down. - if (mCrashReporter && !mShuttingDown) { + if (mCrashReporter && + !mShuttingDown && + Preferences::GetBool("dom.ipc.tabs.createKillHardCrashReports", false)) { // GeneratePairedMinidump creates two minidumps for us - the main // one is for the content process we're about to kill, and the other // one is for the main browser process. That second one is the extra @@ -3458,8 +3460,6 @@ ContentParent::GeneratePairedMinidump(const char* aReason) { mCreatedPairedMinidumps = mCrashReporter->FinalizeCrashReport(); } - - Telemetry::Accumulate(Telemetry::SUBPROCESS_KILL_HARD, reason, 1); } } @@ -3481,6 +3481,9 @@ ContentParent::KillHard(const char* aReason) GeneratePairedMinidump(aReason); + nsDependentCString reason(aReason); + Telemetry::Accumulate(Telemetry::SUBPROCESS_KILL_HARD, reason, 1); + ProcessHandle otherProcessHandle; if (!base::OpenProcessHandle(OtherPid(), &otherProcessHandle)) { NS_ERROR("Failed to open child process when attempting kill."); diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js index af9868d2d566..76b23bda3f0e 100644 --- a/modules/libpref/init/all.js +++ b/modules/libpref/init/all.js @@ -3312,6 +3312,14 @@ pref("dom.ipc.plugins.hangUIMinDisplaySecs", 0); #endif #endif +// Whether or not to collect a paired minidump when force-killing a +// content process. +#ifdef RELEASE_OR_BETA +pref("dom.ipc.tabs.createKillHardCrashReports", false); +#else +pref("dom.ipc.tabs.createKillHardCrashReports", true); +#endif + pref("dom.ipc.plugins.flash.disable-protected-mode", false); pref("dom.ipc.plugins.flash.subprocess.crashreporter.enabled", true);