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 e4f34e9705
commit ffb04c43dd

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);
}