Bug 488596 - test_crashreporter.js crashes intermittently: delete the exception handler before freeing the data it references, landing as a bustage fix with presumed-r=ted

This commit is contained in:
Benjamin Smedberg 2009-07-23 11:23:19 -04:00
parent 6631ab6c3b
commit 0d265fb2ec

View File

@ -656,6 +656,8 @@ nsresult SetupExtraData(nsILocalFile* aAppDataDirectory,
nsresult UnsetExceptionHandler()
{
delete gExceptionHandler;
// do this here in the unlikely case that we succeeded in allocating
// our strings but failed to allocate gExceptionHandler.
if (crashReporterAPIData_Hash) {
@ -681,7 +683,6 @@ nsresult UnsetExceptionHandler()
if (!gExceptionHandler)
return NS_ERROR_NOT_INITIALIZED;
delete gExceptionHandler;
gExceptionHandler = nsnull;
return NS_OK;