Bug 779122 - nsXPCComponents_Utils::RecomputeWrappers should return nsresult, not bool; r=bholley
authorAryeh Gregor <ayg@aryeh.name>
Tue, 31 Jul 2012 18:24:38 +0300
changeset 101076 7a62a2433ba157ae96c2ba4ab79652222bb3c0df
parent 101071 f94b5c54e94e5ed7c286b2bdfcbcd497bf7b2733
child 101077 657325841098ea7d7d4a95dee89382700fad7af4
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersbholley
bugs779122
milestone17.0a1
Bug 779122 - nsXPCComponents_Utils::RecomputeWrappers should return nsresult, not bool; r=bholley
js/xpconnect/src/XPCComponents.cpp
--- 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();