From 4f2be16d687ab7c725094746966140d34faa5dcd Mon Sep 17 00:00:00 2001 From: Marco Castelluccio Date: Thu, 30 Nov 2023 16:47:01 +0000 Subject: [PATCH] Backed out changeset 4bbe309179a5 (bug 1866098) for causing bc failures related to browser_startup. CLOSED TREE UltraBlame original commit: 556c8b22cbbbcc165c42b2c52ebdfd01be3cee6b --- toolkit/xre/MacApplicationDelegate.mm | 10 -------- widget/cocoa/nsAppShell.h | 7 ++++++ widget/cocoa/nsAppShell.mm | 33 +++++++++++++++++++++++++++ 3 files changed, 40 insertions(+), 10 deletions(-) diff --git a/toolkit/xre/MacApplicationDelegate.mm b/toolkit/xre/MacApplicationDelegate.mm index 671a26d903903..80929512cec55 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 293b93fb01656..55c8e33f71e5b 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 340d16c817432..3e060be107eac 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