Bug 1239494 - Followup to fix a spurious hazard analysis failure; r=meow

This commit is contained in:
Terrence Cole 2016-01-14 14:43:03 -08:00
parent 5dc078c9a3
commit 5ca09977f1

View File

@ -1165,8 +1165,7 @@ nsJSObjWrapper::GetNewOrUsed(NPP npp, JSContext *cx, JS::Handle<JSObject*> obj)
// Insert the new wrapper into the hashtable, rooting the JSObject. Its
// lifetime is now tied to that of the NPObject.
nsJSObjWrapperKey key(obj, npp);
if (!sJSObjWrappers.putNew(key, wrapper)) {
if (!sJSObjWrappers.putNew(nsJSObjWrapperKey(obj, npp), wrapper)) {
// Out of memory, free the wrapper we created.
_releaseobject(wrapper);
return nullptr;