File mozilla-aarch64-startup-crash.patch of Package thunderbird144

# HG changeset patch
# User msirringhaus@suse.de
# Date 1558442998 -7200
#      Tue May 21 14:49:58 2019 +0200
# Node ID 386083b58d8558141901d796ec6919a4aba7ad3a
# Parent  fb09659004cc482034e408f2ab0d6fca1dae9968
bsc#991344 - Rpi3: Firefox crashes after a few seconds of usage
bmo#1302554 - ARM/AARCH64: Firefox crashes on NULL nsIChannel** result pointer in nsIOService::NewChannelFromURIWithProxyFlagsInternal()

diff --git a/netwerk/base/nsIOService.cpp b/netwerk/base/nsIOService.cpp
--- a/netwerk/base/nsIOService.cpp
+++ b/netwerk/base/nsIOService.cpp
@@ -1227,17 +1227,24 @@ nsresult nsIOService::NewChannelFromURIW
     return NS_ERROR_UNEXPECTED;
   }
 
   // If we're sandboxed, make sure to clear any owner the channel
   // might already have.
   if (loadInfo->GetLoadingSandboxed()) {
     channel->SetOwner(nullptr);
   }
+
+#if defined(__aarch64__)
+  if (result) {
+    channel.forget(result);
+  }
+#else
   channel.forget(result);
+#endif
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsIOService::NewChannelFromURIWithProxyFlags(
     nsIURI* aURI, nsIURI* aProxyURI, uint32_t aProxyFlags,
     nsINode* aLoadingNode, nsIPrincipal* aLoadingPrincipal,
     nsIPrincipal* aTriggeringPrincipal, uint32_t aSecurityFlags,
openSUSE Build Service is sponsored by