Bug 1414318 - Turn off |StartWriter| in leak checking builds. r=mccr8

--HG--
extra : rebase_source : e3bb106353cae86df23a3bf4747f1a425a4b0049
extra : source : 83f0e033450d1dce9a9ce96b37b465ae50dacdb6
This commit is contained in:
Eric Rahm 2017-11-03 14:17:57 -07:00
parent b1140e3113
commit 92611476ca
2 changed files with 11 additions and 10 deletions

View File

@ -236,7 +236,8 @@ void RunWriter(void* arg)
// Setup destinationPath and tmpFilePath
nsCString destinationPath(static_cast<char*>(arg));
nsCString destinationPath;
destinationPath.Adopt(static_cast<char*>(arg));
nsAutoCString tmpFilePath;
tmpFilePath.Append(destinationPath);
tmpFilePath.AppendLiteral(".tmp");
@ -369,12 +370,12 @@ nsTerminator::Start()
{
MOZ_ASSERT(!mInitialized);
StartWatchdog();
#if !defined(DEBUG)
// Only allow nsTerminator to write on non-debug builds so we don't get leak warnings on
// shutdown for intentional leaks (see bug 1242084). This will be enabled again by bug
// 1255484 when 1255478 lands.
#if !defined(NS_FREE_PERMANENT_DATA)
// Only allow nsTerminator to write on non-leak-checked builds so we don't
// get leak warnings on shutdown for intentional leaks (see bug 1242084).
// This will be enabled again by bug 1255484 when 1255478 lands.
StartWriter();
#endif // !defined(DEBUG)
#endif // !defined(NS_FREE_PERMANENT_DATA)
mInitialized = true;
}
@ -463,12 +464,12 @@ nsTerminator::Observe(nsISupports *, const char *aTopic, const char16_t *)
}
UpdateHeartbeat(aTopic);
#if !defined(DEBUG)
// Only allow nsTerminator to write on non-debug builds so we don't get leak warnings on
#if !defined(NS_FREE_PERMANENT_DATA)
// Only allow nsTerminator to write on non-leak checked builds so we don't get leak warnings on
// shutdown for intentional leaks (see bug 1242084). This will be enabled again by bug
// 1255484 when 1255478 lands.
UpdateTelemetry();
#endif // !defined(DEBUG)
#endif // !defined(NS_FREE_PERMANENT_DATA)
UpdateCrashReport(aTopic);
// Perform a little cleanup

View File

@ -2,6 +2,6 @@
head=
[test_terminator_record.js]
skip-if = debug # Disabled by bug 1242084, bug 1255484 will enable it again.
skip-if = debug || asan # Disabled by bug 1242084, bug 1255484 will enable it again.
[test_terminator_reload.js]
skip-if = os == "android"