Bug 1100501 - Add StatisticsRecorder initialization to xpcshell. r=georg

This commit is contained in:
Jim Mathies 2015-04-11 07:02:29 -05:00
parent 0d5968de22
commit 68b6f8552d

View File

@ -32,6 +32,8 @@
#include "nsIPrincipal.h"
#include "nsJSUtils.h"
#include "base/histogram.h"
#ifdef ANDROID
#include <android/log.h>
#endif
@ -1244,6 +1246,11 @@ XRE_XPCShellMain(int argc, char** argv, char** envp)
NS_LogInit();
// A initializer to initialize histogram collection
// used by telemetry.
UniquePtr<base::StatisticsRecorder> telStats =
MakeUnique<base::StatisticsRecorder>();
nsCOMPtr<nsIFile> appFile;
rv = XRE_GetBinaryPath(argv[0], getter_AddRefs(appFile));
if (NS_FAILED(rv)) {
@ -1534,6 +1541,7 @@ XRE_XPCShellMain(int argc, char** argv, char** envp)
bogus = nullptr;
#endif
telStats = nullptr;
appDir = nullptr;
appFile = nullptr;
dirprovider.ClearGREDirs();