зеркало из https://github.com/mozilla/pjs.git
mrbkap's patch for 418293 with a few nits picked, r=me, a=beltzner.
This commit is contained in:
Родитель
9c63da04b3
Коммит
8d22165416
|
@ -1085,11 +1085,32 @@ JS_GetFrameCallObject(JSContext *cx, JSStackFrame *fp)
|
|||
JS_PUBLIC_API(JSObject *)
|
||||
JS_GetFrameThis(JSContext *cx, JSStackFrame *fp)
|
||||
{
|
||||
if (!fp->thisp && fp->argv) {
|
||||
fp->thisp = js_ComputeThis(cx, JS_TRUE, fp->argv);
|
||||
if (!fp->thisp)
|
||||
return NULL;
|
||||
JSStackFrame *afp;
|
||||
|
||||
if (fp->flags & JSFRAME_COMPUTED_THIS)
|
||||
return fp->thisp;
|
||||
|
||||
/* js_ComputeThis gets confused if fp != cx->fp, so set it aside. */
|
||||
if (cx->fp != fp) {
|
||||
afp = cx->fp;
|
||||
if (afp) {
|
||||
afp->dormantNext = cx->dormantFrameChain;
|
||||
cx->dormantFrameChain = afp;
|
||||
cx->fp = fp;
|
||||
}
|
||||
} else {
|
||||
afp = NULL;
|
||||
}
|
||||
|
||||
if (!fp->thisp && fp->argv)
|
||||
fp->thisp = js_ComputeThis(cx, JS_TRUE, fp->argv);
|
||||
|
||||
if (afp) {
|
||||
cx->fp = afp;
|
||||
cx->dormantFrameChain = afp->dormantNext;
|
||||
afp->dormantNext = NULL;
|
||||
}
|
||||
|
||||
return fp->thisp;
|
||||
}
|
||||
|
||||
|
@ -1670,9 +1691,9 @@ JS_SetContextDebugHooks(JSContext *cx, JSDebugHooks *hooks)
|
|||
#ifdef MOZ_SHARK
|
||||
|
||||
JS_PUBLIC_API(JSBool)
|
||||
JS_StartChudRemote()
|
||||
JS_StartChudRemote()
|
||||
{
|
||||
if (chudIsRemoteAccessAcquired() &&
|
||||
if (chudIsRemoteAccessAcquired() &&
|
||||
(chudStartRemotePerfMonitor("Mozilla") == chudSuccess)) {
|
||||
return JS_TRUE;
|
||||
}
|
||||
|
@ -1730,7 +1751,7 @@ js_StopShark(JSContext *cx, JSObject *obj,
|
|||
if (!JS_StopChudRemote()) {
|
||||
JS_ReportError(cx, "Error stopping CHUD.");
|
||||
}
|
||||
|
||||
|
||||
return JS_TRUE;
|
||||
}
|
||||
|
||||
|
@ -1741,7 +1762,7 @@ js_ConnectShark(JSContext *cx, JSObject *obj,
|
|||
if (!JS_ConnectShark()) {
|
||||
JS_ReportError(cx, "Error connecting to Shark.");
|
||||
}
|
||||
|
||||
|
||||
return JS_TRUE;
|
||||
}
|
||||
|
||||
|
@ -1752,7 +1773,7 @@ js_DisconnectShark(JSContext *cx, JSObject *obj,
|
|||
if (!JS_DisconnectShark()) {
|
||||
JS_ReportError(cx, "Error disconnecting from Shark.");
|
||||
}
|
||||
|
||||
|
||||
return JS_TRUE;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче