mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
Back out 52b481205766 (Bug 429592) for Linux64 opt orange
This commit is contained in:
parent
4fc05fb1da
commit
8cbed94c12
@ -205,7 +205,6 @@ static const int kAvailableVirtualMemoryParameterLen =
|
||||
sizeof(kAvailableVirtualMemoryParameter)-1;
|
||||
|
||||
// this holds additional data sent via the API
|
||||
static Mutex* crashReporterAPILock;
|
||||
static AnnotationTable* crashReporterAPIData_Hash;
|
||||
static nsCString* crashReporterAPIData = nsnull;
|
||||
static nsCString* notesField = nsnull;
|
||||
@ -618,9 +617,6 @@ nsresult SetExceptionHandler(nsILocalFile* aXREDirectory,
|
||||
crashReporterAPIData = new nsCString();
|
||||
NS_ENSURE_TRUE(crashReporterAPIData, NS_ERROR_OUT_OF_MEMORY);
|
||||
|
||||
NS_ASSERTION(!crashReporterAPILock, "Shouldn't have a lock yet");
|
||||
crashReporterAPILock = new Mutex("crashReporterAPILock");
|
||||
|
||||
crashReporterAPIData_Hash =
|
||||
new nsDataHashtable<nsCStringHashKey,nsCString>();
|
||||
NS_ENSURE_TRUE(crashReporterAPIData_Hash, NS_ERROR_OUT_OF_MEMORY);
|
||||
@ -1041,17 +1037,20 @@ nsresult UnsetExceptionHandler()
|
||||
|
||||
// do this here in the unlikely case that we succeeded in allocating
|
||||
// our strings but failed to allocate gExceptionHandler.
|
||||
delete crashReporterAPIData_Hash;
|
||||
crashReporterAPIData_Hash = nsnull;
|
||||
if (crashReporterAPIData_Hash) {
|
||||
delete crashReporterAPIData_Hash;
|
||||
crashReporterAPIData_Hash = nsnull;
|
||||
}
|
||||
|
||||
delete crashReporterAPILock;
|
||||
crashReporterAPILock = nsnull;
|
||||
if (crashReporterAPIData) {
|
||||
delete crashReporterAPIData;
|
||||
crashReporterAPIData = nsnull;
|
||||
}
|
||||
|
||||
delete crashReporterAPIData;
|
||||
crashReporterAPIData = nsnull;
|
||||
|
||||
delete notesField;
|
||||
notesField = nsnull;
|
||||
if (notesField) {
|
||||
delete notesField;
|
||||
notesField = nsnull;
|
||||
}
|
||||
|
||||
if (crashReporterPath) {
|
||||
NS_Free(crashReporterPath);
|
||||
@ -1180,10 +1179,6 @@ nsresult AnnotateCrashReport(const nsACString& key, const nsACString& data)
|
||||
return rv;
|
||||
|
||||
if (XRE_GetProcessType() != GeckoProcessType_Default) {
|
||||
if (!NS_IsMainThread()) {
|
||||
NS_ERROR("Cannot call AnnotateCrashReport in child processes from non-main thread.");
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
PCrashReporterChild* reporter = CrashReporterChild::GetCrashReporter();
|
||||
if (!reporter) {
|
||||
EnqueueDelayedNote(new DelayedNote(key, data));
|
||||
@ -1194,8 +1189,6 @@ nsresult AnnotateCrashReport(const nsACString& key, const nsACString& data)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
MutexAutoLock lock(*crashReporterAPILock);
|
||||
|
||||
rv = crashReporterAPIData_Hash->Put(key, escapedData);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
|
@ -64,12 +64,7 @@ bool GetServerURL(nsACString& aServerURL);
|
||||
nsresult SetServerURL(const nsACString& aServerURL);
|
||||
bool GetMinidumpPath(nsAString& aPath);
|
||||
nsresult SetMinidumpPath(const nsAString& aPath);
|
||||
|
||||
|
||||
// AnnotateCrashReport may be called from any thread in a chrome process,
|
||||
// but may only be called from the main thread in a content process.
|
||||
nsresult AnnotateCrashReport(const nsACString& key, const nsACString& data);
|
||||
|
||||
nsresult AppendAppNotesToCrashReport(const nsACString& data);
|
||||
nsresult SetRestartArgs(int argc, char** argv);
|
||||
nsresult SetupExtraData(nsILocalFile* aAppDataDirectory,
|
||||
|
Loading…
Reference in New Issue
Block a user