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