Bug 950822 - js/src/vm/Runtime.cpp: remove obsolete code where JS_STACK_GROWTH_DIRECTION > 0. r=bholley, a=sledru
authorIan Stakenvicius <axs@gentoo.org>
Sat, 03 May 2014 12:04:00 +0200
changeset 199087 2f253c8cf8d271f92931b745c4a3ab8489444a35
parent 199086 bdef20bf49fb59191bb3e7f1532e181d4e71dfb3
child 199088 134ad4b3d77b91602441ad170e3834f5c9ab22fe
push id3624
push userasasaki@mozilla.com
push dateMon, 09 Jun 2014 21:49:01 +0000
treeherdermozilla-beta@b1a5da15899a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbholley, sledru
bugs950822
milestone31.0a2
Bug 950822 - js/src/vm/Runtime.cpp: remove obsolete code where JS_STACK_GROWTH_DIRECTION > 0. r=bholley, a=sledru
js/src/jsfriendapi.cpp
js/src/vm/Runtime.cpp
--- a/js/src/jsfriendapi.cpp
+++ b/js/src/jsfriendapi.cpp
@@ -34,16 +34,20 @@ using mozilla::PodArrayZero;
 
 // Required by PerThreadDataFriendFields::getMainThread()
 JS_STATIC_ASSERT(offsetof(JSRuntime, mainThread) ==
                  PerThreadDataFriendFields::RuntimeMainThreadOffset);
 
 PerThreadDataFriendFields::PerThreadDataFriendFields()
 {
     PodArrayZero(nativeStackLimit);
+#if JS_STACK_GROWTH_DIRECTION > 0
+    for (int i=0; i<StackKindCount; i++)
+        nativeStackLimit[i] = UINTPTR_MAX;
+#endif
 #if defined(JSGC_USE_EXACT_ROOTING)
     PodArrayZero(thingGCRooters);
 #endif
 }
 
 JS_FRIEND_API(void)
 js::SetSourceHook(JSRuntime *rt, SourceHook *hook)
 {
--- a/js/src/vm/Runtime.cpp
+++ b/js/src/vm/Runtime.cpp
@@ -314,20 +314,16 @@ JSRuntime::JSRuntime(JSRuntime *parentRu
     setGCMode(JSGC_MODE_GLOBAL);
 
     /* Initialize infallibly first, so we can goto bad and JS_DestroyRuntime. */
     JS_INIT_CLIST(&onNewGlobalObjectWatchers);
 
     PodZero(&debugHooks);
     PodArrayZero(nativeStackQuota);
     PodZero(&asmJSCacheOps);
-
-#if JS_STACK_GROWTH_DIRECTION > 0
-    mainThread.nativeStackLimit = UINTPTR_MAX;
-#endif
 }
 
 static bool
 JitSupportsFloatingPoint()
 {
 #if defined(JS_ION)
     if (!JSC::MacroAssembler::supportsFloatingPoint())
         return false;