Bug 1499465 - Don't collect KillHard crashes on Beta or Release. r=jld,gsvelto

Differential Revision: https://phabricator.services.mozilla.com/D10968

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Mike Conley 2018-11-20 21:34:36 +00:00
Родитель 533bba3865
Коммит 29879177ba
2 изменённых файлов: 14 добавлений и 3 удалений

Просмотреть файл

@ -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.");

Просмотреть файл

@ -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);