Add some patches from Archlinux to fix yelp build, enabling jit on x86_64, etc. --HG-- extra : convert_revision : ba44c08730192d6dca4cf9c6443e4172d6f3d544
90 lines
3.3 KiB
Diff
90 lines
3.3 KiB
Diff
--- toolkit/xre/nsAppRunner.cpp
|
|
+++ toolkit/xre/nsAppRunner.cpp
|
|
@@ -3281,23 +3281,16 @@ XRE_main(int argc, char* argv[], const n
|
|
}
|
|
dirProvider.DoStartup();
|
|
|
|
PRBool shuttingDown = PR_FALSE;
|
|
appStartup->GetShuttingDown(&shuttingDown);
|
|
|
|
nsCOMPtr<nsICommandLineRunner> cmdLine;
|
|
|
|
-#if defined(HAVE_DESKTOP_STARTUP_ID) && defined(MOZ_WIDGET_GTK2)
|
|
- nsRefPtr<nsGTKToolkit> toolkit = GetGTKToolkit();
|
|
- if (toolkit && !desktopStartupID.IsEmpty()) {
|
|
- toolkit->SetDesktopStartupID(desktopStartupID);
|
|
- }
|
|
-#endif
|
|
-
|
|
nsCOMPtr<nsIFile> workingDir;
|
|
rv = NS_GetSpecialDirectory(NS_OS_CURRENT_WORKING_DIR, getter_AddRefs(workingDir));
|
|
NS_ENSURE_SUCCESS(rv, 1);
|
|
|
|
if (!shuttingDown) {
|
|
cmdLine = do_CreateInstance("@mozilla.org/toolkit/command-line;1");
|
|
NS_ENSURE_TRUE(cmdLine, 1);
|
|
|
|
@@ -3315,16 +3308,23 @@ XRE_main(int argc, char* argv[], const n
|
|
|
|
NS_TIMELINE_ENTER("appStartup->CreateHiddenWindow");
|
|
rv = appStartup->CreateHiddenWindow();
|
|
NS_TIMELINE_LEAVE("appStartup->CreateHiddenWindow");
|
|
NS_ENSURE_SUCCESS(rv, 1);
|
|
|
|
MOZ_SPLASHSCREEN_UPDATE(50);
|
|
|
|
+#if defined(HAVE_DESKTOP_STARTUP_ID) && defined(MOZ_WIDGET_GTK2)
|
|
+ nsRefPtr<nsGTKToolkit> toolkit = GetGTKToolkit();
|
|
+ if (toolkit && !desktopStartupID.IsEmpty()) {
|
|
+ toolkit->SetDesktopStartupID(desktopStartupID);
|
|
+ }
|
|
+#endif
|
|
+
|
|
// Extension Compatibility Checking and Startup
|
|
if (gAppData->flags & NS_XRE_ENABLE_EXTENSION_MANAGER) {
|
|
nsCOMPtr<nsIExtensionManager> em(do_GetService("@mozilla.org/extensions/manager;1"));
|
|
NS_ENSURE_TRUE(em, 1);
|
|
|
|
if (upgraded) {
|
|
rv = em->CheckForMismatches(&needsRestart);
|
|
if (NS_FAILED(rv)) {
|
|
--- toolkit/xre/nsAppRunner.cpp
|
|
+++ toolkit/xre/nsAppRunner.cpp
|
|
@@ -3602,30 +3602,23 @@ XRE_main(int argc, char* argv[], const n
|
|
#ifdef XP_MACOSX
|
|
if (gBinaryPath) {
|
|
static char kEnvVar[MAXPATHLEN];
|
|
sprintf(kEnvVar, "XRE_BINARY_PATH=%s", gBinaryPath);
|
|
PR_SetEnv(kEnvVar);
|
|
}
|
|
#endif
|
|
|
|
-// XXXkt s/MOZ_TOOLKIT_GTK2/MOZ_WIDGET_GTK2/?
|
|
-// but the hidden window has been destroyed so toolkit is NULL anyway.
|
|
-#if defined(HAVE_DESKTOP_STARTUP_ID) && defined(MOZ_TOOLKIT_GTK2)
|
|
- nsGTKToolkit* toolkit = GetGTKToolkit();
|
|
- if (toolkit) {
|
|
- nsCAutoString currentDesktopStartupID;
|
|
- toolkit->GetDesktopStartupID(¤tDesktopStartupID);
|
|
- if (!currentDesktopStartupID.IsEmpty()) {
|
|
- nsCAutoString desktopStartupEnv;
|
|
- desktopStartupEnv.AssignLiteral("DESKTOP_STARTUP_ID=");
|
|
- desktopStartupEnv.Append(currentDesktopStartupID);
|
|
- // Leak it with extreme prejudice!
|
|
- PR_SetEnv(ToNewCString(desktopStartupEnv));
|
|
- }
|
|
+#if defined(HAVE_DESKTOP_STARTUP_ID) && defined(MOZ_WIDGET_GTK2)
|
|
+ if (!desktopStartupID.IsEmpty()) {
|
|
+ nsCAutoString desktopStartupEnv;
|
|
+ desktopStartupEnv.AssignLiteral("DESKTOP_STARTUP_ID=");
|
|
+ desktopStartupEnv.Append(desktopStartupID);
|
|
+ // Leak it with extreme prejudice!
|
|
+ PR_SetEnv(ToNewCString(desktopStartupEnv));
|
|
}
|
|
#endif
|
|
|
|
#ifdef MOZ_WIDGET_GTK2
|
|
MOZ_gdk_display_close(display);
|
|
#endif
|
|
|
|
rv = LaunchChild(nativeApp, appInitiatedRestart);
|