Bug 771168 - AssertJit should not assume there is a StackFrame (test only,r=me)
authorLuke Wagner <luke@mozilla.com>
Mon, 27 Aug 2012 08:55:18 -0700
changeset 105608 c47ec3f2e7771182cd7d34d9501047d64d9e3f30
parent 105607 5184abd63490cdd4dc3cee35de666cb324efa86a
child 105609 28c1e4960596c9fe35e1b79fdea3a72fc7c39fd8
push id55
push usershu@rfrn.org
push dateThu, 30 Aug 2012 01:33:09 +0000
reviewersme
bugs771168
milestone17.0a1
Bug 771168 - AssertJit should not assume there is a StackFrame (test only,r=me)
js/src/shell/js.cpp
--- a/js/src/shell/js.cpp
+++ b/js/src/shell/js.cpp
@@ -1271,21 +1271,21 @@ AssertEq(JSContext *cx, unsigned argc, j
 }
 
 static JSBool
 AssertJit(JSContext *cx, unsigned argc, jsval *vp)
 {
 #ifdef JS_METHODJIT
     if (JS_GetOptions(cx) & JSOPTION_METHODJIT) {
         /*
-         * :XXX: Ignore calls to this native when inference is enabled,
-         * with METHODJIT_ALWAYS recompilation can happen and discard the
-         * script's jitcode.
+         * Ignore calls to this native when inference is enabled, with
+         * METHODJIT_ALWAYS recompilation can happen and discard the script's
+         * jitcode.
          */
-        if (!cx->typeInferenceEnabled() && !cx->fp()->jit()) {
+        if (!cx->typeInferenceEnabled() && cx->hasfp() && !cx->fp()->jit()) {
             JS_ReportErrorNumber(cx, my_GetErrorMessage, NULL, JSSMSG_ASSERT_JIT_FAILED);
             return false;
         }
     }
 #endif
 
     JS_SET_RVAL(cx, vp, JSVAL_VOID);
     return true;