Bug 1162318 - Rooting hazard in WrapNativeParentHelper, r=peterv

This commit is contained in:
Steve Fink 2015-05-07 09:51:06 -07:00
parent e8e225562e
commit e6c9d9144e

View File

@ -1540,8 +1540,10 @@ struct WrapNativeParentHelper<T, false>
JSObject* obj;
if (cache && (obj = cache->GetWrapper())) {
#ifdef DEBUG
NS_ASSERTION(WrapNativeISupportsParent(cx, parent, cache) == obj,
JS::Rooted<JSObject*> rootedObj(cx, obj);
NS_ASSERTION(WrapNativeISupportsParent(cx, parent, cache) == rootedObj,
"Unexpected object in nsWrapperCache");
obj = rootedObj;
#endif
return obj;
}