зеркало из https://github.com/mozilla/gecko-dev.git
Bug 784730 - Crash in ReparentWrapperIfFound if wrapper already in scope. r=bholley
This commit is contained in:
Родитель
62c71cbd25
Коммит
cfb102dafc
|
@ -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();
|
||||
|
|
Загрузка…
Ссылка в новой задаче