From 25779d371c571e4f51792af3e3c5588b3186e934 Mon Sep 17 00:00:00 2001
From: wolfbeast <mcwerewolf@wolfbeast.com>
Date: Sat, 30 Mar 2019 19:10:17 +0100
Subject: Issue #187: Remove solaris conditional code.

---
 toolkit/xre/nsSigHandlers.cpp | 55 -------------------------------------------
 1 file changed, 55 deletions(-)

(limited to 'toolkit/xre')

diff --git a/toolkit/xre/nsSigHandlers.cpp b/toolkit/xre/nsSigHandlers.cpp
index 098d9ae7e..454882c1b 100644
--- a/toolkit/xre/nsSigHandlers.cpp
+++ b/toolkit/xre/nsSigHandlers.cpp
@@ -32,11 +32,6 @@
 #endif
 #endif
 
-#if defined(SOLARIS)
-#include <sys/resource.h>
-#include <ucontext.h>
-#endif
-
 static const char* gProgname = "huh?";
 
 // Note: some tests manipulate this value.
@@ -198,32 +193,6 @@ static void fpehandler(int signum, siginfo_t *si, void *context)
   *mxcsr &= ~SSE_STATUS_FLAGS; /* clear all pending SSE exceptions */
 #endif
 #endif
-#ifdef SOLARIS
-  ucontext_t *uc = (ucontext_t *)context;
-
-#if defined(__i386)
-  uint32_t *cw = &uc->uc_mcontext.fpregs.fp_reg_set.fpchip_state.state[0];
-  *cw |= FPU_EXCEPTION_MASK;
-
-  uint32_t *sw = &uc->uc_mcontext.fpregs.fp_reg_set.fpchip_state.state[1];
-  *sw &= ~FPU_STATUS_FLAGS;
-
-  /* address of the instruction that caused the exception */
-  uint32_t *ip = &uc->uc_mcontext.fpregs.fp_reg_set.fpchip_state.state[3];
-  uc->uc_mcontext.gregs[REG_PC] = *ip;
-#endif
-#if defined(__amd64__)
-  uint16_t *cw = &uc->uc_mcontext.fpregs.fp_reg_set.fpchip_state.cw;
-  *cw |= FPU_EXCEPTION_MASK;
-
-  uint16_t *sw = &uc->uc_mcontext.fpregs.fp_reg_set.fpchip_state.sw;
-  *sw &= ~FPU_STATUS_FLAGS;
-
-  uint32_t *mxcsr = &uc->uc_mcontext.fpregs.fp_reg_set.fpchip_state.mxcsr;
-  *mxcsr |= SSE_EXCEPTION_MASK; /* disable all SSE exceptions */
-  *mxcsr &= ~SSE_STATUS_FLAGS; /* clear all pending SSE exceptions */
-#endif
-#endif
 }
 #endif
 
@@ -286,30 +255,6 @@ void InstallSignalHandlers(const char *aProgname)
   }
 #endif
 
-#if defined(SOLARIS)
-#define NOFILES 512
-
-    // Boost Solaris file descriptors
-    {
-	struct rlimit rl;
-	
-	if (getrlimit(RLIMIT_NOFILE, &rl) == 0)
-
-	    if (rl.rlim_cur < NOFILES) {
-		rl.rlim_cur = NOFILES;
-
-		if (setrlimit(RLIMIT_NOFILE, &rl) < 0) {
-		    perror("setrlimit(RLIMIT_NOFILE)");
-		    fprintf(stderr, "Cannot exceed hard limit for open files");
-		}
-#if defined(DEBUG)
-	    	if (getrlimit(RLIMIT_NOFILE, &rl) == 0)
-		    printf("File descriptors set to %d\n", rl.rlim_cur);
-#endif //DEBUG
-	    }
-    }
-#endif //SOLARIS
-
 #if defined(MOZ_WIDGET_GTK) && (GLIB_MAJOR_VERSION > 2 || (GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION >= 6))
   const char *assertString = PR_GetEnv("XPCOM_DEBUG_BREAK");
   if (assertString &&
-- 
cgit v1.2.3


From bfc97728065cbbc7f6bbc281b654a2d1e079b48d Mon Sep 17 00:00:00 2001
From: wolfbeast <mcwerewolf@wolfbeast.com>
Date: Mon, 1 Apr 2019 13:04:33 +0200
Subject: Unhook CR exception handler.

Tag #20
---
 toolkit/xre/nsAndroidStartup.cpp  | 1 -
 toolkit/xre/nsEmbedFunctions.cpp  | 1 -
 toolkit/xre/nsX11ErrorHandler.cpp | 1 -
 3 files changed, 3 deletions(-)

(limited to 'toolkit/xre')

diff --git a/toolkit/xre/nsAndroidStartup.cpp b/toolkit/xre/nsAndroidStartup.cpp
index 47b9ec6e5..68ad75c01 100644
--- a/toolkit/xre/nsAndroidStartup.cpp
+++ b/toolkit/xre/nsAndroidStartup.cpp
@@ -17,7 +17,6 @@
 #include "nsIFile.h"
 #include "nsAppRunner.h"
 #include "APKOpen.h"
-#include "nsExceptionHandler.h"
 
 #define LOG(args...) __android_log_print(ANDROID_LOG_INFO, MOZ_APP_NAME, args)
 
diff --git a/toolkit/xre/nsEmbedFunctions.cpp b/toolkit/xre/nsEmbedFunctions.cpp
index 3757dec2f..52b443770 100644
--- a/toolkit/xre/nsEmbedFunctions.cpp
+++ b/toolkit/xre/nsEmbedFunctions.cpp
@@ -32,7 +32,6 @@
 #include "nsAppRunner.h"
 #include "nsAutoRef.h"
 #include "nsDirectoryServiceDefs.h"
-#include "nsExceptionHandler.h"
 #include "nsString.h"
 #include "nsThreadUtils.h"
 #include "nsJSUtils.h"
diff --git a/toolkit/xre/nsX11ErrorHandler.cpp b/toolkit/xre/nsX11ErrorHandler.cpp
index 0fb0d29c5..9a6888adf 100644
--- a/toolkit/xre/nsX11ErrorHandler.cpp
+++ b/toolkit/xre/nsX11ErrorHandler.cpp
@@ -7,7 +7,6 @@
 
 #include "prenv.h"
 #include "nsXULAppAPI.h"
-#include "nsExceptionHandler.h"
 #include "nsDebug.h"
 
 #include "mozilla/X11Util.h"
-- 
cgit v1.2.3


From ff2f287f82630ab3887d7d5c1e64e5b888ea0beb Mon Sep 17 00:00:00 2001
From: wolfbeast <mcwerewolf@wolfbeast.com>
Date: Mon, 1 Apr 2019 13:05:24 +0200
Subject: Remove crashreporter toolkit files.

Resolves #20
---
 toolkit/xre/moz.build | 1 -
 1 file changed, 1 deletion(-)

(limited to 'toolkit/xre')

diff --git a/toolkit/xre/moz.build b/toolkit/xre/moz.build
index 55b59ca83..072bd9ff9 100644
--- a/toolkit/xre/moz.build
+++ b/toolkit/xre/moz.build
@@ -145,7 +145,6 @@ LOCAL_INCLUDES += [
     '/dom/base',
     '/dom/ipc',
     '/testing/gtest/mozilla',
-    '/toolkit/crashreporter',
     '/xpcom/build',
 ]
 
-- 
cgit v1.2.3