Bug 671632 - Fix shark builds broken by bug 588537 (r=waldo)

--HG--
extra : rebase_source : baa3e89fb3ccc0549aee2c752bb4a46ccc494eec
This commit is contained in:
Steve Fink 2011-07-15 11:47:16 -07:00
Родитель 9208ecead5
Коммит a79b03d5e3
1 изменённых файлов: 7 добавлений и 8 удалений

Просмотреть файл

@ -65,13 +65,13 @@ bool
Probes::controlProfilers(JSContext *cx, bool toState) Probes::controlProfilers(JSContext *cx, bool toState)
{ {
JSBool ok = JS_TRUE; JSBool ok = JS_TRUE;
#if defined(MOZ_SHARK) || defined(MOZ_CALLGRIND) || defined(MOZ_VTUNE) #if defined(MOZ_CALLGRIND) || defined(MOZ_VTUNE)
jsval dummy; jsval dummy;
#endif #endif
if (! ProfilingActive && toState) { if (! ProfilingActive && toState) {
#ifdef MOZ_SHARK #if defined(MOZ_SHARK) && defined(__APPLE__)
if (! js_StartShark(cx, 0, &dummy)) if (!Shark::Start())
ok = JS_FALSE; ok = JS_FALSE;
#endif #endif
#ifdef MOZ_CALLGRIND #ifdef MOZ_CALLGRIND
@ -83,9 +83,8 @@ Probes::controlProfilers(JSContext *cx, bool toState)
ok = JS_FALSE; ok = JS_FALSE;
#endif #endif
} else if (ProfilingActive && ! toState) { } else if (ProfilingActive && ! toState) {
#ifdef MOZ_SHARK #if defined(MOZ_SHARK) && defined(__APPLE__)
if (! js_StopShark(cx, 0, &dummy)) Shark::Stop();
ok = JS_FALSE;
#endif #endif
#ifdef MOZ_CALLGRIND #ifdef MOZ_CALLGRIND
if (! js_StopCallgrind(cx, 0, &dummy)) if (! js_StopCallgrind(cx, 0, &dummy))
@ -167,7 +166,7 @@ Probes::handleFunctionReturn(JSContext *cx, JSFunction *fun, JSScript *script)
bool bool
Probes::startProfiling() Probes::startProfiling()
{ {
#ifdef MOZ_SHARK #if defined(MOZ_SHARK) && defined(__APPLE__)
if (Shark::Start()) if (Shark::Start())
return true; return true;
#endif #endif
@ -177,7 +176,7 @@ Probes::startProfiling()
void void
Probes::stopProfiling() Probes::stopProfiling()
{ {
#ifdef MOZ_SHARK #if defined(MOZ_SHARK) && defined(__APPLE__)
Shark::Stop(); Shark::Stop();
#endif #endif
} }