Bug 634436 - Fix bogus profiler assertion in tracer (r=gal)
--- a/js/src/jstracer.cpp
+++ b/js/src/jstracer.cpp
@@ -6493,17 +6493,17 @@ TracerState::TracerState(JSContext* cx,
builtinStatus(0),
nativeVp(NULL)
{
JS_ASSERT(!tm->tracecx);
tm->tracecx = cx;
prev = tm->tracerState;
tm->tracerState = this;
-#ifdef JS_METH
+#ifdef JS_METHODJIT
if (TRACE_PROFILER(cx))
AbortProfiling(cx);
#endif
JS_ASSERT(JS_THREAD_DATA(cx)->onTraceCompartment == NULL);
JS_ASSERT(JS_THREAD_DATA(cx)->recordingCompartment == NULL ||
JS_THREAD_DATA(cx)->recordingCompartment == cx->compartment);
JS_ASSERT(JS_THREAD_DATA(cx)->profilingCompartment == NULL);
@@ -6622,18 +6622,16 @@ static JS_REQUIRES_STACK bool
ExecuteTree(JSContext* cx, TraceMonitor* tm, TreeFragment* f, uintN& inlineCallCount,
VMSideExit** innermostNestedGuardp, VMSideExit **lrp)
{
#ifdef MOZ_TRACEVIS
TraceVisStateObj tvso(cx, S_EXECUTE);
#endif
JS_ASSERT(f->root == f && f->code());
- JS_ASSERT(!tm->profile);
-
if (!ScopeChainCheck(cx, f) || !cx->stack().ensureEnoughSpaceToEnterTrace() ||
inlineCallCount + f->maxCallDepth > JS_MAX_INLINE_CALL_COUNT) {
*lrp = NULL;
return true;
}
/* Make sure the global object is sane. */
JS_ASSERT(f->globalObj->numSlots() <= MAX_GLOBAL_SLOTS);