7159266: [macosx] ApplicationDelegate should not be set in the headless mode
Don't install ApplicationDelegate in headless mode Reviewed-by: art, serb
This commit is contained in:
parent
c7b9274feb
commit
8b7ad3288c
@ -312,15 +312,17 @@ AWT_ASSERT_APPKIT_THREAD;
|
||||
if (verbose) AWT_DEBUG_LOG(@"got out of the AppKit startup mutex");
|
||||
}
|
||||
|
||||
// Don't set the delegate until the NSApplication has been created and
|
||||
// its finishLaunching has initialized it.
|
||||
// ApplicationDelegate is the support code for com.apple.eawt.
|
||||
[ThreadUtilities performOnMainThreadWaiting:YES block:^(){
|
||||
id<NSApplicationDelegate> delegate = [ApplicationDelegate sharedDelegate];
|
||||
if (delegate != nil) {
|
||||
OSXAPP_SetApplicationDelegate(delegate);
|
||||
}
|
||||
}];
|
||||
if (!headless) {
|
||||
// Don't set the delegate until the NSApplication has been created and
|
||||
// its finishLaunching has initialized it.
|
||||
// ApplicationDelegate is the support code for com.apple.eawt.
|
||||
[ThreadUtilities performOnMainThreadWaiting:YES block:^(){
|
||||
id<NSApplicationDelegate> delegate = [ApplicationDelegate sharedDelegate];
|
||||
if (delegate != nil) {
|
||||
OSXAPP_SetApplicationDelegate(delegate);
|
||||
}
|
||||
}];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)starter:(NSArray*)args {
|
||||
|
Loading…
x
Reference in New Issue
Block a user