Bug 580033 - JS_Save/RestoreFrameChain should update cx->compartment. r=gal,mrbkap.

--HG--
extra : rebase_source : ff05faf1a39513255bcd6218b0adf6ab554a30b1
This commit is contained in:
Jason Orendorff 2010-09-14 14:38:09 -07:00
Родитель dfdfb5e887
Коммит 1491318f84
1 изменённых файлов: 3 добавлений и 0 удалений

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

@ -2089,6 +2089,9 @@ struct JSContext
/* 'regs' must only be changed by calling this function. */
void setCurrentRegs(JSFrameRegs *regs) {
this->regs = regs;
JSObject *obj = JS_GetGlobalForScopeChain(this);
compartment = obj ? obj->getCompartment(this) : runtime->defaultCompartment;
}
/* Temporary arena pool used while compiling and decompiling. */