Bug 592930 - TM: set right compartment for mozJSComponentLoader::ModuleEntry::Clear r=mrbkap

This commit is contained in:
Gregor Wagner 2010-09-03 00:34:36 -07:00
parent 6c6b045b0d
commit e9d53dc7ea

View File

@ -174,6 +174,7 @@ class mozJSComponentLoader : public mozilla::ModuleLoader,
if (global) {
JSAutoRequest ar(sSelf->mContext);
JSAutoEnterCompartment ac(sSelf->mContext, global);
JS_ClearScope(sSelf->mContext, global);
JS_RemoveObjectRoot(sSelf->mContext, &global);
}