mirror of
https://github.com/yuzu-emu/breakpad.git
synced 2025-09-14 21:37:20 +00:00
Allow the Breakpad Mac framework to be built without -fexceptions.
Review URL: http://breakpad.appspot.com/34003 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@417 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
parent
cb33b20f75
commit
a3043159f3
|
@ -747,9 +747,7 @@ BreakpadRef BreakpadCreate(NSDictionary *parameters) {
|
||||||
|
|
||||||
// Create a mutex for use in accessing the SimpleStringDictionary
|
// Create a mutex for use in accessing the SimpleStringDictionary
|
||||||
int mutexResult = pthread_mutex_init(&gDictionaryMutex, NULL);
|
int mutexResult = pthread_mutex_init(&gDictionaryMutex, NULL);
|
||||||
if (mutexResult != 0) {
|
if (mutexResult == 0) {
|
||||||
throw mutexResult; // caught down below
|
|
||||||
}
|
|
||||||
|
|
||||||
// With the current compiler, gBreakpadAllocator is allocating 1444 bytes.
|
// With the current compiler, gBreakpadAllocator is allocating 1444 bytes.
|
||||||
// Let's round up to the nearest page size.
|
// Let's round up to the nearest page size.
|
||||||
|
@ -775,23 +773,20 @@ BreakpadRef BreakpadCreate(NSDictionary *parameters) {
|
||||||
gMasterAllocator->Protect();
|
gMasterAllocator->Protect();
|
||||||
gKeyValueAllocator->Protect();
|
gKeyValueAllocator->Protect();
|
||||||
gBreakpadAllocator->Protect();
|
gBreakpadAllocator->Protect();
|
||||||
} else {
|
|
||||||
[pool release];
|
|
||||||
#ifdef __EXCEPTIONS
|
|
||||||
throw(-1);
|
|
||||||
#else
|
|
||||||
return NULL;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
// Can uncomment this line to figure out how much space was actually
|
// Can uncomment this line to figure out how much space was actually
|
||||||
// allocated using this allocator
|
// allocated using this allocator
|
||||||
// printf("gBreakpadAllocator allocated size = %d\n",
|
// printf("gBreakpadAllocator allocated size = %d\n",
|
||||||
// gBreakpadAllocator->GetAllocatedSize() );
|
// gBreakpadAllocator->GetAllocatedSize() );
|
||||||
|
|
||||||
[pool release];
|
[pool release];
|
||||||
return (BreakpadRef)breakpad;
|
return (BreakpadRef)breakpad;
|
||||||
|
}
|
||||||
|
|
||||||
|
[pool release];
|
||||||
|
}
|
||||||
} catch(...) { // don't let exceptions leave this C API
|
} catch(...) { // don't let exceptions leave this C API
|
||||||
|
fprintf(stderr, "BreakpadCreate() : error\n");
|
||||||
|
}
|
||||||
|
|
||||||
if (gKeyValueAllocator) {
|
if (gKeyValueAllocator) {
|
||||||
gKeyValueAllocator->~ProtectedMemoryAllocator();
|
gKeyValueAllocator->~ProtectedMemoryAllocator();
|
||||||
gKeyValueAllocator = NULL;
|
gKeyValueAllocator = NULL;
|
||||||
|
@ -804,7 +799,6 @@ BreakpadRef BreakpadCreate(NSDictionary *parameters) {
|
||||||
|
|
||||||
delete gMasterAllocator;
|
delete gMasterAllocator;
|
||||||
gMasterAllocator = NULL;
|
gMasterAllocator = NULL;
|
||||||
}
|
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue