зеркало из https://github.com/mozilla/gecko-dev.git
Bug 580033 - JS_Save/RestoreFrameChain should update cx->compartment. r=gal.
--HG-- extra : rebase_source : e063e91c61f159c98ac4f8f0e3bb74eceee069e6
This commit is contained in:
Родитель
3dd9f9600b
Коммит
2c34e0d185
|
@ -2087,6 +2087,7 @@ JSContext::saveActiveCallStack()
|
|||
JS_ASSERT(fp->savedPC == JSStackFrame::sInvalidPC);
|
||||
fp->savedPC = regs->pc;
|
||||
setCurrentFrame(NULL);
|
||||
compartment = globalObject ? globalObject->getCompartment(this) : runtime->defaultCompartment;
|
||||
setCurrentRegs(NULL);
|
||||
}
|
||||
|
||||
|
@ -2095,6 +2096,8 @@ JSContext::restoreCallStack()
|
|||
{
|
||||
js::CallStack *ccs = currentCallStack;
|
||||
setCurrentFrame(ccs->getSuspendedFrame());
|
||||
JSObject *obj = JS_GetGlobalForScopeChain(this);
|
||||
compartment = obj ? obj->getCompartment(this) : runtime->defaultCompartment;
|
||||
setCurrentRegs(ccs->getSuspendedRegs());
|
||||
ccs->restore();
|
||||
#ifdef DEBUG
|
||||
|
|
Загрузка…
Ссылка в новой задаче