зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1693434
- Report uncaught Objective C exceptions. r=spohl
NSSetUncaughtExceptionHandler installs a handler which is called just before we would crash anyway, I think. So this handler lets us collect information about exceptions that are not even caught by the native event loop. Differential Revision: https://phabricator.services.mozilla.com/D105561
This commit is contained in:
Родитель
f5abfe3c32
Коммит
e81702af5f
|
@ -122,8 +122,18 @@ extern int32_t gXULModalLevel;
|
|||
|
||||
static bool gAppShellMethodsSwizzled = false;
|
||||
|
||||
void OnUncaughtException(NSException* aException) {
|
||||
nsObjCExceptionLog(aException);
|
||||
MOZ_CRASH("Uncaught Objective C exception from NSSetUncaughtExceptionHandler");
|
||||
}
|
||||
|
||||
@implementation GeckoNSApplication
|
||||
|
||||
// Load is called very early during startup, when the Objective C runtime loads this class.
|
||||
+ (void)load {
|
||||
NSSetUncaughtExceptionHandler(OnUncaughtException);
|
||||
}
|
||||
|
||||
- (void)sendEvent:(NSEvent*)anEvent {
|
||||
mozilla::BackgroundHangMonitor().NotifyActivity();
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче