--- a/jdk/src/macosx/native/sun/awt/awt.m Fri Jan 18 14:17:11 2013 +0400
+++ b/jdk/src/macosx/native/sun/awt/awt.m Fri Jan 18 18:17:02 2013 +0400
@@ -315,14 +315,9 @@
// 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.
- void (^setDelegateBlock)() = ^(){
+ [ThreadUtilities performOnMainThreadWaiting:YES block:^(){
OSXAPP_SetApplicationDelegate([ApplicationDelegate sharedDelegate]);
- };
- if (onMainThread) {
- setDelegateBlock();
- } else {
- [JNFRunLoop performOnMainThreadWaiting:YES withBlock:setDelegateBlock];
- }
+ }];
}
- (void)starter:(NSArray*)args {