diff --git a/toolkit/xre/MacApplicationDelegate.mm b/toolkit/xre/MacApplicationDelegate.mm index 671a26d90390..80929512cec5 100644 --- a/toolkit/xre/MacApplicationDelegate.mm +++ b/toolkit/xre/MacApplicationDelegate.mm @@ -936,13 +936,6 @@ ) notification { -dispatch_async -( -dispatch_get_main_queue -( -) -^ -{ if ( sLaunchStatus @@ -1006,9 +999,6 @@ ; } } -) -; -} - ( NSApplicationTerminateReply diff --git a/widget/cocoa/nsAppShell.h b/widget/cocoa/nsAppShell.h index 293b93fb0165..55c8e33f71e5 100644 --- a/widget/cocoa/nsAppShell.h +++ b/widget/cocoa/nsAppShell.h @@ -43,6 +43,13 @@ GeckoNSApplication NSApplication { } +property +( +readonly +) +BOOL +didLaunch +; end class AppShellDelegate diff --git a/widget/cocoa/nsAppShell.mm b/widget/cocoa/nsAppShell.mm index 340d16c81743..3e060be107ea 100644 --- a/widget/cocoa/nsAppShell.mm +++ b/widget/cocoa/nsAppShell.mm @@ -834,6 +834,22 @@ ( void ) +run +{ +_didLaunch += +YES +; +[ +super +run +] +; +} +- +( +void +) sendEvent : ( @@ -923,6 +939,14 @@ ) flag { +MOZ_ASSERT +( +[ +NSApp +didLaunch +] +) +; if ( expiration @@ -2551,6 +2575,15 @@ if ( aMayWait +& +& +[ +[ +GeckoNSApplication +sharedApplication +] +didLaunch +] ) { currentMode