Bug 634436 - Fix bogus profiler assertion in tracer (r=gal)
authorBill McCloskey <wmccloskey@mozilla.com>
Tue, 15 Feb 2011 16:53:40 -0800
changeset 62781 5e18294f6a9b294d93df1330f5211b9a80b47006
parent 62780 a17596187c713ef8c249a68bbdbb4410c59667a6
child 62782 951f34044122ae7167be34beab926590337fc657
push idunknown
push userunknown
push dateunknown
reviewersgal
bugs634436
milestone2.0b12pre
Bug 634436 - Fix bogus profiler assertion in tracer (r=gal)
js/src/jstracer.cpp
--- 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);