Browse Source

port bug 1908725 to fix build bustage

Bill Gianopoulos 2 months ago
parent
commit
a0b299112b

+ 75 - 0
comm-central/patches/9999999-port1908725-suite-bustage.patch

@@ -0,0 +1,75 @@
+# HG changeset patch
+# User Bill Gianopoulos <wgianopoulos@gmail.com>
+# Date 1723236439 0
+Bug 9999999 - Port bug 1908725 to suite.
+Bug 1908725 - Provide a never-reused PID alternative for all Gecko processes.
+
+diff --git a/suite/app/moz.build b/suite/app/moz.build
+--- a/suite/app/moz.build
++++ b/suite/app/moz.build
+@@ -13,17 +13,16 @@ if CONFIG['MOZ_NO_PIE_COMPAT']:
+     DIRS += ['no-pie']
+ else:
+     GeckoProgram(CONFIG['MOZ_APP_NAME'])
+ 
+ SOURCES += ["nsSuiteApp.cpp"]
+ 
+ LOCAL_INCLUDES += [
+     "!/build",
+-    "/ipc/contentproc/",
+     "/toolkit/xre",
+     "/xpcom/base",
+     "/xpcom/build",
+ ]
+ 
+ if CONFIG["OS_ARCH"] == "WINNT":
+     RCINCLUDE = "splash.rc"
+     DEFINES["MOZ_SUITE"] = True
+diff --git a/suite/app/nsSuiteApp.cpp b/suite/app/nsSuiteApp.cpp
+--- a/suite/app/nsSuiteApp.cpp
++++ b/suite/app/nsSuiteApp.cpp
+@@ -93,17 +94,16 @@ SSE2Check()
+                    MOZ_ARRAY_LENGTH(sSSE2Message) - 1));
+   // _exit() instead of exit() to avoid running the usual "at exit" code.
+   _exit(255);
+ }
+ #endif
+ 
+ #if !defined(MOZ_WIDGET_COCOA) && !defined(MOZ_WIDGET_ANDROID)
+ #define MOZ_BROWSER_CAN_BE_CONTENTPROC
+-#include "plugin-container.cpp"
+ #endif
+ 
+ using namespace mozilla;
+ 
+ #ifdef XP_MACOSX
+ #define kOSXResourcesFolder "Resources"
+ #endif
+ #define kDesktopFolder ""
+@@ -287,22 +287,24 @@ int main(int argc, char* argv[], char* e
+     }
+ #endif
+ 
+     nsresult rv = InitXPCOMGlue(LibLoadingStrategy::NoReadAhead);
+     if (NS_FAILED(rv)) {
+       return 255;
+     }
+ 
+-    int result = content_process_main(gBootstrap.get(), argc, argv);
++    XREChildData childData;
++
++    rv = gBootstrap->XRE_InitChildProcess(argc, argv, &childData);
+ 
+     // InitXPCOMGlue calls NS_LogInit, so we need to balance it here.
+     gBootstrap->NS_LogTerm();
+ 
+-    return result;
++    return NS_FAILED(rv) ? 1 : 0;
+   }
+ #endif
+ 
+ #ifdef HAS_DLL_BLOCKLIST
+   DllBlocklist_Initialize(gBlocklistInitFlags);
+ #endif
+ 
+   nsresult rv = InitXPCOMGlue(LibLoadingStrategy::ReadAhead);

+ 1 - 0
comm-central/patches/series

@@ -3,6 +3,7 @@
 9999999-port1900200-suite-bustage.patch
 9999999-port1903050-suite-bustage.patch
 9999999-port1860654-suite-bustage.patch
+9999999-port1908725-suite-bustage.patch
 TOP-1642188-remove-nsDOMIEvent-cc.patch
 TOP-1614671-port1456035-4-and-5-61a1-cc.patch
 TOP-1611647-1-rename-xul-suite.patch