mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 784730 - Crash in ReparentWrapperIfFound if wrapper already in scope. r=bholley
This commit is contained in:
parent
b43577c768
commit
2093b2df88
@ -107,6 +107,7 @@ public:
|
||||
{
|
||||
NS_PRECONDITION(wrapper,"bad param");
|
||||
nsISupports* obj = wrapper->GetIdentityObject();
|
||||
MOZ_ASSERT(!Find(obj), "wrapper already in new scope!");
|
||||
Entry* entry = (Entry*)
|
||||
JS_DHashTableOperate(mTable, obj, JS_DHASH_ADD);
|
||||
if (!entry)
|
||||
|
@ -1582,8 +1582,8 @@ XPCWrappedNative::ReparentWrapperIfFound(XPCCallContext& ccx,
|
||||
wrapper->UpdateScriptableInfo(newProto->GetScriptableInfo());
|
||||
}
|
||||
|
||||
NS_ASSERTION(!newMap->Find(wrapper->GetIdentityObject()),
|
||||
"wrapper already in new scope!");
|
||||
if (newMap->Find(wrapper->GetIdentityObject()))
|
||||
MOZ_CRASH();
|
||||
|
||||
if (!newMap->Add(wrapper))
|
||||
MOZ_CRASH();
|
||||
|
Loading…
Reference in New Issue
Block a user