Avoid bogus assertbotch (more work needed to reconstruct imacro stack depth).
authorBrendan Eich <brendan@mozilla.org>
Sat, 15 Nov 2008 23:56:49 -0800
changeset 21726 8b3caddca8f51928841cb329d71ccb4a185ebcba
parent 21725 e36b9418613b0fc87da2549f27e319feff88c4b2
child 21727 f780c4b81eb4e490d07eeb28e5f07c72c83192d1
child 21767 ebb3e752cb341278c3eb2f57e944d0e9b0068c98
child 21768 30de088bd25d09d5e667202b0ce2f09fdbe9b48d
push id3654
push userrsayre@mozilla.com
push dateSun, 16 Nov 2008 07:58:26 +0000
treeherdermozilla-central@8b3caddca8f5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone1.9.1b2pre
Avoid bogus assertbotch (more work needed to reconstruct imacro stack depth).
js/src/jstracer.cpp
--- a/js/src/jstracer.cpp
+++ b/js/src/jstracer.cpp
@@ -2736,22 +2736,19 @@ static int
 js_SynthesizeFrame(JSContext* cx, const FrameInfo& fi)
 {
     JS_ASSERT(HAS_FUNCTION_CLASS(fi.callee));
 
     JSFunction* fun = GET_FUNCTION_PRIVATE(cx, fi.callee);
     JS_ASSERT(FUN_INTERPRETED(fun));
 
     /* Assert that we have a correct sp distance from cx->fp->slots in fi. */
-    JS_ASSERT(js_ReconstructStackDepth(cx, cx->fp->script,
-                                       FI_IMACRO_PC(fi, cx->fp)
-                                       ? FI_SCRIPT_PC(fi, cx->fp) +
-                                         js_CodeSpec[*FI_SCRIPT_PC(fi, cx->fp)].length
-                                       : FI_SCRIPT_PC(fi, cx->fp))
-              == uintN(fi.s.spdist - cx->fp->script->nfixed));
+    JS_ASSERT_IF(!FI_IMACRO_PC(fi, cx->fp),
+                 js_ReconstructStackDepth(cx, cx->fp->script, FI_SCRIPT_PC(fi, cx->fp))
+                 == uintN(fi.s.spdist - cx->fp->script->nfixed));
 
     uintN nframeslots = JS_HOWMANY(sizeof(JSInlineFrame), sizeof(jsval));
     JSScript* script = fun->u.i.script;
     size_t nbytes = (nframeslots + script->nslots) * sizeof(jsval);
 
     /* Code duplicated from inline_call: case in js_Interpret (FIXME). */
     JSArena* a = cx->stackPool.current;
     void* newmark = (void*) a->avail;