Remove the new wrapper from the map when postcreate fails so that we don't find
it the next time we try to wrap that object. bug 344873, r=jst sr=brendan git-svn-id: svn://10.0.0.236/trunk@203033 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
31b85dec44
commit
33bd5eca53
@ -461,7 +461,15 @@ XPCWrappedNative::GetNewOrUsed(XPCCallContext& ccx,
|
||||
rv = si->GetCallback()->
|
||||
PostCreate(wrapper, ccx, wrapper->GetFlatJSObject());
|
||||
if(NS_FAILED(rv))
|
||||
{
|
||||
{ // scoped lock
|
||||
XPCAutoLock lock(mapLock);
|
||||
map->Remove(wrapper);
|
||||
}
|
||||
|
||||
wrapper->Release();
|
||||
return rv;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user