Bug 867530 - Initialize the poison value in XPCOM startup and annotate the values in crash reporter. r=bsmedberg

This commit is contained in:
Mats Palmgren 2013-05-07 20:48:59 +02:00
parent 401785134b
commit 40741f4bf9
2 changed files with 9 additions and 1 deletions

View File

@ -23,10 +23,11 @@
#include "mozilla/dom/ContentParent.h"
#include "mozilla/dom/ContentChild.h"
#include "mozilla/Util.h"
#include "mozilla/Attributes.h"
#include "mozilla/Likely.h"
#include "mozilla/Poison.h"
#include "mozilla/Telemetry.h"
#include "mozilla/Util.h"
#include "nsAppRunner.h"
#include "mozilla/AppData.h"
@ -918,6 +919,10 @@ nsXULAppInfo::SetEnabled(bool aEnabled)
if (!xreDirectory)
return NS_ERROR_FAILURE;
}
AnnotateCrashReport(NS_LITERAL_CSTRING("FramePoisonBase"),
nsPrintfCString("%.16llx", uint64_t(gMozillaPoisonBase)));
AnnotateCrashReport(NS_LITERAL_CSTRING("FramePoisonSize"),
nsPrintfCString("%lu", uint32_t(gMozillaPoisonSize)));
return CrashReporter::SetExceptionHandler(xreDirectory, true);
}
else {

View File

@ -6,6 +6,7 @@
#include "base/basictypes.h"
#include "mozilla/Poison.h"
#include "mozilla/XPCOM.h"
#include "nsXULAppAPI.h"
@ -329,6 +330,8 @@ NS_InitXPCOM2(nsIServiceManager* *result,
nsIFile* binDirectory,
nsIDirectoryServiceProvider* appFileLocationProvider)
{
mozPoisonValueInit();
profiler_init();
nsresult rv = NS_OK;