Bug 779122 - nsXPCComponents_Utils::RecomputeWrappers should return nsresult, not bool; r=bholley
--- a/js/xpconnect/src/XPCComponents.cpp
+++ b/js/xpconnect/src/XPCComponents.cpp
@@ -4317,21 +4317,23 @@ nsXPCComponents_Utils::RecomputeWrappers
{
// Determine the compartment of the given object, if any.
JSCompartment *c = vobj.isObject()
? js::GetObjectCompartment(js::UnwrapObject(&vobj.toObject()))
: NULL;
// If no compartment was given, recompute all.
if (!c)
- return js::RecomputeWrappers(cx, js::AllCompartments(), js::AllCompartments());
-
+ js::RecomputeWrappers(cx, js::AllCompartments(), js::AllCompartments());
// Otherwise, recompute wrappers for the given compartment.
- return js::RecomputeWrappers(cx, js::SingleCompartment(c), js::AllCompartments()) &&
- js::RecomputeWrappers(cx, js::AllCompartments(), js::SingleCompartment(c));
+ else
+ js::RecomputeWrappers(cx, js::SingleCompartment(c), js::AllCompartments()) &&
+ js::RecomputeWrappers(cx, js::AllCompartments(), js::SingleCompartment(c));
+
+ return NS_OK;
}
/* string canCreateWrapper (in nsIIDPtr iid); */
NS_IMETHODIMP
nsXPCComponents_Utils::CanCreateWrapper(const nsIID * iid, char **_retval)
{
// We let anyone do this...
*_retval = xpc_CloneAllAccess();