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

View File

@ -2,6 +2,6 @@
head= head=
[test_terminator_record.js] [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] [test_terminator_reload.js]
skip-if = os == "android" skip-if = os == "android"