Bug 1242084 - nsTerminator::UpdateTelemetry() leaks 8 byte nsStringBuffer when app.update.channel gets set to Beta. r=gfritzsche

This commit is contained in:
Alessio Placitelli 2016-03-14 06:12:00 +01:00
Родитель 9dd5be4a33
Коммит d5ca6b79e8
2 изменённых файлов: 11 добавлений и 1 удалений

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

@ -358,7 +358,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.
StartWriter();
#endif // !defined(DEBUG)
mInitialized = true;
}
@ -399,7 +404,6 @@ nsTerminator::StartWatchdog()
void
nsTerminator::StartWriter()
{
if (!Telemetry::CanRecordExtended()) {
return;
}
@ -448,7 +452,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
// shutdown for intentional leaks (see bug 1242084). This will be enabled again by bug
// 1255484 when 1255478 lands.
UpdateTelemetry();
#endif // !defined(DEBUG)
UpdateCrashReport(aTopic);
// Perform a little cleanup

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

@ -3,5 +3,6 @@ head=
tail=
[test_terminator_record.js]
skip-if = debug # Disabled by bug 1242084, bug 1255484 will enable it again.
[test_terminator_reload.js]
skip-if = (os == "android" || appname == "b2g")