diff --git a/js/src/jstracer.cpp b/js/src/jstracer.cpp index 6572e59dc71..aabbee172ed 100644 --- a/js/src/jstracer.cpp +++ b/js/src/jstracer.cpp @@ -15752,14 +15752,14 @@ TraceRecorder::record_JSOP_CALLELEM() JS_REQUIRES_STACK AbortableRecordingStatus TraceRecorder::record_JSOP_STOP() { + JSStackFrame *fp = cx->fp(); + /* A return from callDepth 0 terminates the current loop, except for recursion. */ - if (callDepth == 0) { + if (callDepth == 0 && !fp->hasImacropc()) { AUDIT(returnLoopExits); return endLoop(); } - JSStackFrame *fp = cx->fp(); - if (fp->hasImacropc()) { /* * End of imacro, so return true to the interpreter immediately. The