summaryrefslogtreecommitdiff
path: root/js/xpconnect
diff options
context:
space:
mode:
Diffstat (limited to 'js/xpconnect')
-rw-r--r--js/xpconnect/shell/moz.build5
-rw-r--r--js/xpconnect/shell/xpcshell.cpp11
-rw-r--r--js/xpconnect/shell/xpcshellMacUtils.h8
-rw-r--r--js/xpconnect/shell/xpcshellMacUtils.mm18
-rw-r--r--js/xpconnect/src/Sandbox.cpp10
-rw-r--r--js/xpconnect/src/XPCJSContext.cpp7
-rw-r--r--js/xpconnect/src/XPCShellImpl.cpp24
7 files changed, 1 insertions, 82 deletions
diff --git a/js/xpconnect/shell/moz.build b/js/xpconnect/shell/moz.build
index c1789fdc71..3361b7d810 100644
--- a/js/xpconnect/shell/moz.build
+++ b/js/xpconnect/shell/moz.build
@@ -14,11 +14,6 @@ SOURCES += [
'xpcshell.cpp',
]
-if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
- SOURCES += [
- 'xpcshellMacUtils.mm',
- ]
-
include('/ipc/chromium/chromium-config.mozbuild')
LOCAL_INCLUDES += [
diff --git a/js/xpconnect/shell/xpcshell.cpp b/js/xpconnect/shell/xpcshell.cpp
index 35e12449f8..3460e98a15 100644
--- a/js/xpconnect/shell/xpcshell.cpp
+++ b/js/xpconnect/shell/xpcshell.cpp
@@ -10,9 +10,6 @@
#include "mozilla/WindowsDllBlocklist.h"
#include "nsXULAppAPI.h"
-#ifdef XP_MACOSX
-#include "xpcshellMacUtils.h"
-#endif
#ifdef XP_WIN
#include <windows.h>
#include <shlobj.h>
@@ -37,10 +34,6 @@ main(int argc, char** argv, char** envp)
gtk_parse_args(&argc, &argv);
#endif
-#ifdef XP_MACOSX
- InitAutoreleasePool();
-#endif
-
// unbuffer stdout so that output is in the correct order; note that stderr
// is unbuffered by default
setbuf(stdout, 0);
@@ -51,9 +44,5 @@ main(int argc, char** argv, char** envp)
int result = XRE_XPCShellMain(argc, argv, envp);
-#ifdef XP_MACOSX
- FinishAutoreleasePool();
-#endif
-
return result;
}
diff --git a/js/xpconnect/shell/xpcshellMacUtils.h b/js/xpconnect/shell/xpcshellMacUtils.h
deleted file mode 100644
index 2e6b5cb359..0000000000
--- a/js/xpconnect/shell/xpcshellMacUtils.h
+++ /dev/null
@@ -1,8 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-// Functions to setup and release the Mac memory pool
-void InitAutoreleasePool();
-void FinishAutoreleasePool();
diff --git a/js/xpconnect/shell/xpcshellMacUtils.mm b/js/xpconnect/shell/xpcshellMacUtils.mm
deleted file mode 100644
index 61d6a9ea9a..0000000000
--- a/js/xpconnect/shell/xpcshellMacUtils.mm
+++ /dev/null
@@ -1,18 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include <Foundation/Foundation.h>
-
-static NSAutoreleasePool *pool = NULL;
-
-void InitAutoreleasePool()
-{
- pool = [[NSAutoreleasePool alloc] init];
-}
-
-void FinishAutoreleasePool()
-{
- [pool release];
-}
diff --git a/js/xpconnect/src/Sandbox.cpp b/js/xpconnect/src/Sandbox.cpp
index 742559ce3b..ba40e120ed 100644
--- a/js/xpconnect/src/Sandbox.cpp
+++ b/js/xpconnect/src/Sandbox.cpp
@@ -127,16 +127,6 @@ SandboxDump(JSContext* cx, unsigned argc, Value* vp)
if (!cstr)
return false;
-#if defined(XP_MACOSX)
- // Be nice and convert all \r to \n.
- char* c = cstr;
- char* cEnd = cstr + strlen(cstr);
- while (c < cEnd) {
- if (*c == '\r')
- *c = '\n';
- c++;
- }
-#endif
#ifdef ANDROID
__android_log_write(ANDROID_LOG_INFO, "GeckoDump", cstr);
#endif
diff --git a/js/xpconnect/src/XPCJSContext.cpp b/js/xpconnect/src/XPCJSContext.cpp
index e941b8d758..a9f779b894 100644
--- a/js/xpconnect/src/XPCJSContext.cpp
+++ b/js/xpconnect/src/XPCJSContext.cpp
@@ -3209,12 +3209,7 @@ XPCJSContext::Initialize()
// the web to base this decision primarily on the default stack size that the
// underlying platform makes available, but that seems to be what we do. :-(
-#if defined(XP_MACOSX) || defined(DARWIN)
- // MacOS has a gargantuan default stack size of 8MB. Go wild with 7MB,
- // and give trusted script 180k extra. The stack is huge on mac anyway.
- const size_t kStackQuota = 7 * 1024 * 1024;
- const size_t kTrustedScriptBuffer = 180 * 1024;
-#elif defined(MOZ_ASAN)
+#if defined(MOZ_ASAN)
// ASan requires more stack space due to red-zones, so give it double the
// default (1MB on 32-bit, 2MB on 64-bit). ASAN stack frame measurements
// were not taken at the time of this writing, so we hazard a guess that
diff --git a/js/xpconnect/src/XPCShellImpl.cpp b/js/xpconnect/src/XPCShellImpl.cpp
index affc7d2bc7..c0e9532a96 100644
--- a/js/xpconnect/src/XPCShellImpl.cpp
+++ b/js/xpconnect/src/XPCShellImpl.cpp
@@ -1288,22 +1288,6 @@ XRE_XPCShellMain(int argc, char** argv, char** envp)
argc -= 2;
argv += 2;
} else {
-#ifdef XP_MACOSX
- // On OSX, the GreD needs to point to Contents/Resources in the .app
- // bundle. Libraries will be loaded at a relative path to GreD, i.e.
- // ../MacOS.
- nsCOMPtr<nsIFile> tmpDir;
- XRE_GetFileFromPath(argv[0], getter_AddRefs(greDir));
- greDir->GetParent(getter_AddRefs(tmpDir));
- tmpDir->Clone(getter_AddRefs(greDir));
- tmpDir->SetNativeLeafName(NS_LITERAL_CSTRING("Resources"));
- bool dirExists = false;
- tmpDir->Exists(&dirExists);
- if (dirExists) {
- greDir = tmpDir.forget();
- }
- dirprovider.SetGREDirs(greDir);
-#else
nsAutoString workingDir;
if (!GetCurrentWorkingDirectory(workingDir)) {
printf("GetCurrentWorkingDirectory failed.\n");
@@ -1314,7 +1298,6 @@ XRE_XPCShellMain(int argc, char** argv, char** envp)
printf("NS_NewLocalFile failed.\n");
return 1;
}
-#endif
}
if (argc > 1 && !strcmp(argv[1], "-a")) {
@@ -1570,13 +1553,6 @@ XPCShellDirProvider::SetGREDirs(nsIFile* greDir)
{
mGREDir = greDir;
mGREDir->Clone(getter_AddRefs(mGREBinDir));
-#ifdef XP_MACOSX
- nsAutoCString leafName;
- mGREDir->GetNativeLeafName(leafName);
- if (leafName.Equals("Resources")) {
- mGREBinDir->SetNativeLeafName(NS_LITERAL_CSTRING("MacOS"));
- }
-#endif
}
void