mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-04-06 07:38:21 +00:00
Remove ObjCExceptionCatcher from iOS target
This commit is contained in:
@@ -231,6 +231,7 @@
|
||||
Helpers/LastWindowPosition.swift,
|
||||
Helpers/MetalView.swift,
|
||||
Helpers/NonDraggableHostingView.swift,
|
||||
Helpers/ObjCExceptionCatcher.m,
|
||||
Helpers/PermissionRequest.swift,
|
||||
Helpers/Private/CGS.swift,
|
||||
Helpers/Private/Dock.swift,
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
#import "ObjCExceptionCatcher.h"
|
||||
#import <TargetConditionals.h>
|
||||
|
||||
#if TARGET_OS_OSX
|
||||
#import <AppKit/AppKit.h>
|
||||
#endif
|
||||
|
||||
BOOL GhosttyAddTabbedWindowSafely(
|
||||
id parent,
|
||||
@@ -11,7 +8,6 @@ BOOL GhosttyAddTabbedWindowSafely(
|
||||
NSInteger ordered,
|
||||
NSError * _Nullable * _Nullable error
|
||||
) {
|
||||
#if TARGET_OS_OSX
|
||||
// AppKit occasionally throws NSException while reparenting tabbed windows.
|
||||
// We must catch it in Objective-C; letting this cross into Swift is unsafe.
|
||||
@try {
|
||||
@@ -30,14 +26,4 @@ BOOL GhosttyAddTabbedWindowSafely(
|
||||
|
||||
return NO;
|
||||
}
|
||||
#else
|
||||
if (error != NULL) {
|
||||
*error = [NSError errorWithDomain:@"Ghostty.ObjCException"
|
||||
code:2
|
||||
userInfo:@{
|
||||
NSLocalizedDescriptionKey: @"GhosttyAddTabbedWindowSafely is unavailable on this platform.",
|
||||
}];
|
||||
}
|
||||
return NO;
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user