components/desktop/firefox/patches/firefox-27-stacksize.patch
author Petr Sumbera <petr.sumbera@oracle.com>
Mon, 05 Sep 2016 05:00:46 -0700
branchs11u3-sru
changeset 7035 4c2f26e9d5ab
child 7364 1ac24a377555
permissions -rw-r--r--
24361911 Upgrade Firefox to version 45.4.0 ESR 23033044 firefox needs to be built with "--with-intl-api" option 24708365 problem in FIREFOX/BROWSER 24708614 problem in FIREFOX/BROWSER

For sparc. Our function frame is very big, so on sparc we need more stack size.
Potentially send upstream. 

diff --git a/js/src/jsapi.cpp b/js/src/jsapi.cpp
--- a/js/src/jsapi.cpp
+++ b/js/src/jsapi.cpp
@@ -1491,6 +1491,9 @@
 static void
 SetNativeStackQuotaAndLimit(JSRuntime* rt, StackKind kind, size_t stackSize)
 {
+#ifdef JS_CPU_SPARC
+    stackSize = stackSize * 8 < 7 * 1024 * 1024 ? stackSize * 8 : 7 * 1024 * 1024;
+#endif
     rt->nativeStackQuota[kind] = stackSize;
      
 #if JS_STACK_GROWTH_DIRECTION > 0