mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 980537 - Only store FakeBackstagePass instances in mThisObjects. r=khuey
This commit is contained in:
parent
5c2ac5c86b
commit
8daf887f60
@ -566,7 +566,9 @@ mozJSComponentLoader::NoteSubScript(HandleScript aScript, HandleObject aThisObje
|
||||
MOZ_CRASH();
|
||||
}
|
||||
|
||||
mThisObjects.Put(aScript, aThisObject);
|
||||
if (js::GetObjectJSClass(aThisObject) == &kFakeBackstagePassJSClass) {
|
||||
mThisObjects.Put(aScript, aThisObject);
|
||||
}
|
||||
}
|
||||
|
||||
/* static */ size_t
|
||||
@ -1012,10 +1014,13 @@ mozJSComponentLoader::ObjectForLocation(nsIFile *aComponentFile,
|
||||
|
||||
*aTableScript = tableScript;
|
||||
|
||||
// tableScript stays in the table until shutdown. To avoid it being
|
||||
// collected and another script getting the same address, we root
|
||||
// tableScript lower down in this function.
|
||||
mThisObjects.Put(tableScript, obj);
|
||||
if (js::GetObjectJSClass(obj) == &kFakeBackstagePassJSClass) {
|
||||
MOZ_ASSERT(mReuseLoaderGlobal);
|
||||
// tableScript stays in the table until shutdown. To avoid it being
|
||||
// collected and another script getting the same address, we root
|
||||
// tableScript lower down in this function.
|
||||
mThisObjects.Put(tableScript, obj);
|
||||
}
|
||||
bool ok = false;
|
||||
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user