Browse Source

Port 1690384

Bill Gianopoulos 3 years ago
parent
commit
5d5e75b1db
2 changed files with 37 additions and 0 deletions
  1. 36 0
      comm-central/patches/9999999-port1690384-suite.patch
  2. 1 0
      comm-central/patches/series

+ 36 - 0
comm-central/patches/9999999-port1690384-suite.patch

@@ -0,0 +1,36 @@
+# HG changeset patch
+# User Bill Gianopoulos <wgianopoulos@gmail.com>
+# Date 1614250417 18000
+#      Thu Feb 25 05:53:37 2021 -0500
+Bug 9999999 - Port Bug 1690384: Propagate error information up through XPCOMGlueLoad and GetBootstrap
+
+diff --git a/suite/app/nsSuiteApp.cpp b/suite/app/nsSuiteApp.cpp
+--- a/suite/app/nsSuiteApp.cpp
++++ b/suite/app/nsSuiteApp.cpp
+@@ -245,22 +245,24 @@ static nsresult
+ InitXPCOMGlue()
+ {
+   UniqueFreePtr<char> exePath = BinaryPath::Get();
+   if (!exePath) {
+     Output("Couldn't find the application directory.\n");
+     return NS_ERROR_FAILURE;
+   }
+ 
+-  gBootstrap = mozilla::GetBootstrap(exePath.get());
+-  if (!gBootstrap) {
++  auto bootstrapResult = mozilla::GetBootstrap(exePath.get());
++  if (bootstrapResult.isErr()) {
+     Output("Couldn't load XPCOM.\n");
+     return NS_ERROR_FAILURE;
+   }
+ 
++  gBootstrap = bootstrapResult.unwrap();
++
+   // This will set this thread as the main thread.
+   gBootstrap->NS_LogInit();
+ 
+   return NS_OK;
+ }
+ 
+ #ifdef HAS_DLL_BLOCKLIST
+ // NB: This must be extern, as this value is checked elsewhere

+ 1 - 0
comm-central/patches/series

@@ -6,3 +6,4 @@ TOP-1611647-1-rename-xul-suite.patch
 TOP-1611647-2-fix-xul-references-suite.patch
 WIP-1650630-2-port-1603712-suite.patch
 9999999-port1601110-suite-editor.patch
+9999999-port1690384-suite.patch