зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1692391 - Remove NS_OBJC_TRY_ABORT macro and replace its uses with the block version of the macro. r=haik
Differential Revision: https://phabricator.services.mozilla.com/D104953
This commit is contained in:
Родитель
7ae49906c4
Коммит
173c610fda
|
@ -705,7 +705,9 @@ nsAppShell::Run(void) {
|
|||
// We use the native Gecko event loop in content processes.
|
||||
nsresult rv = NS_OK;
|
||||
if (XRE_UseNativeEventProcessing()) {
|
||||
NS_OBJC_TRY_ABORT([NSApp run]);
|
||||
NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
|
||||
[NSApp run];
|
||||
NS_OBJC_END_TRY_ABORT_BLOCK;
|
||||
} else {
|
||||
rv = nsBaseAppShell::Run();
|
||||
}
|
||||
|
|
|
@ -52,7 +52,11 @@ class nsAutoRetainCocoaObject {
|
|||
explicit nsAutoRetainCocoaObject(id anObject) {
|
||||
mObject = NS_OBJC_TRY_EXPR_ABORT([anObject retain]);
|
||||
}
|
||||
~nsAutoRetainCocoaObject() { NS_OBJC_TRY_ABORT([mObject release]); }
|
||||
~nsAutoRetainCocoaObject() {
|
||||
NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
|
||||
[mObject release];
|
||||
NS_OBJC_END_TRY_ABORT_BLOCK;
|
||||
}
|
||||
|
||||
private:
|
||||
id mObject; // [STRONG]
|
||||
|
|
|
@ -21,13 +21,6 @@
|
|||
|
||||
void nsObjCExceptionLog(NSException* aException);
|
||||
|
||||
#define NS_OBJC_TRY_ABORT(_e) \
|
||||
@try { \
|
||||
_e; \
|
||||
} @catch (NSException * _exn) { \
|
||||
nsObjCExceptionLog(_exn); \
|
||||
}
|
||||
|
||||
#define NS_OBJC_TRY_EXPR_ABORT(_e) \
|
||||
({ \
|
||||
typeof(_e) _tmp; \
|
||||
|
|
Загрузка…
Ссылка в новой задаче