Bug 755916 - All early returns of CheckStackAndEnterMethodJIT should return Jaeger_ThrowBeforeEnter (r=bhackett)
authorLuke Wagner <luke@mozilla.com>
Wed, 16 May 2012 17:48:25 -0700
changeset 94385 1d70f1cf90e8115b55971345a4bbb5833f1e37b3
parent 94384 ba3d61413eccdac60da7f85eac83aca13e177007
child 94386 b72c41ab1bd3ad66f1f9edf6d1c7c3b9acf46d31
push id22712
push userryanvm@gmail.com
push dateSat, 19 May 2012 00:52:01 +0000
treeherdermozilla-central@642d1a36702f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbhackett
bugs755916
milestone15.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 755916 - All early returns of CheckStackAndEnterMethodJIT should return Jaeger_ThrowBeforeEnter (r=bhackett)
js/src/jit-test/tests/basic/testBug755916.js
js/src/methodjit/MethodJIT.cpp
new file mode 100644
--- /dev/null
+++ b/js/src/jit-test/tests/basic/testBug755916.js
@@ -0,0 +1,13 @@
+// |jit-test| error:InternalError
+
+Object.defineProperty(this, "t2", {
+    get: function() {
+        for (p in h2) {
+            t2
+        }
+    }
+})
+h2 = {}
+mjitChunkLimit(8)
+h2.a = function() {}
+Object(t2)
--- a/js/src/methodjit/MethodJIT.cpp
+++ b/js/src/methodjit/MethodJIT.cpp
@@ -1092,17 +1092,17 @@ mjit::EnterMethodJIT(JSContext *cx, Stac
         fp->updateEpilogueFlags();
 
     return ok ? Jaeger_Returned : Jaeger_Throwing;
 }
 
 static inline JaegerStatus
 CheckStackAndEnterMethodJIT(JSContext *cx, StackFrame *fp, void *code, bool partial)
 {
-    JS_CHECK_RECURSION(cx, return Jaeger_Throwing);
+    JS_CHECK_RECURSION(cx, return Jaeger_ThrowBeforeEnter);
 
     JS_ASSERT(!cx->compartment->activeAnalysis);
     JS_ASSERT(code);
 
     Value *stackLimit = cx->stack.space().getStackLimit(cx, REPORT_ERROR);
     if (!stackLimit)
         return Jaeger_ThrowBeforeEnter;