Backed out 3 changesets (bug 877862, bug 878325) for mochitest-other orange on a CLOSED TREE.
authorRyan VanderMeulen <ryanvm@gmail.com>
Mon, 03 Jun 2013 15:50:59 -0400
changeset 133842 0a6f4bdb34bfb5c191d4488dca725b0792b7f67d
parent 133841 1ca1abed8c9a12d1292a3fcbad1cd415eea69cb3
child 133843 3c5ff4fdd7d89605feda40e9ab4b7481ad074bdc
push id28927
push userryanvm@gmail.com
push dateMon, 03 Jun 2013 19:50:57 +0000
treeherdermozilla-inbound@0a6f4bdb34bf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs877862, 878325
milestone24.0a1
backs out803586f0a297a46ef50dc3173defbc99b7dd1aaa
d4a39e18e5a78d5c92e188323e28c2bba79ff116
08a29f18500a1ef8e21187c68de482814bc029aa
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out 3 changesets (bug 877862, bug 878325) for mochitest-other orange on a CLOSED TREE. Backed out changeset 803586f0a297 (bug 878325) Backed out changeset d4a39e18e5a7 (bug 878325) Backed out changeset 08a29f18500a (bug 877862)
content/xul/document/src/XULDocument.cpp
content/xul/templates/src/nsXULTemplateBuilder.cpp
js/xpconnect/wrappers/WrapperFactory.cpp
--- a/content/xul/document/src/XULDocument.cpp
+++ b/content/xul/document/src/XULDocument.cpp
@@ -1166,61 +1166,58 @@ XULDocument::ResolveForwardReferences()
                  "nested ResolveForwardReferences()");
         
     // Resolve each outstanding 'forward' reference. We iterate
     // through the list of forward references until no more forward
     // references can be resolved. This annealing process is
     // guaranteed to converge because we've "closed the gate" to new
     // forward references.
 
-    nsresult rv = NS_OK;
     const nsForwardReference::Phase* pass = nsForwardReference::kPasses;
     while ((mResolutionPhase = *pass) != nsForwardReference::eDone) {
         uint32_t previous = 0;
         while (mForwardReferences.Length() &&
                mForwardReferences.Length() != previous) {
             previous = mForwardReferences.Length();
 
             for (uint32_t i = 0; i < mForwardReferences.Length(); ++i) {
                 nsForwardReference* fwdref = mForwardReferences[i];
 
                 if (fwdref->GetPhase() == *pass) {
                     nsForwardReference::Result result = fwdref->Resolve();
 
                     switch (result) {
+                    case nsForwardReference::eResolve_Succeeded:
                     case nsForwardReference::eResolve_Error:
-                        rv = NS_ERROR_FAILURE;
-                        // Fall through.
-                    case nsForwardReference::eResolve_Succeeded:
                         mForwardReferences.RemoveElementAt(i);
 
                         // fixup because we removed from list
                         --i;
                         break;
 
                     case nsForwardReference::eResolve_Later:
                         // do nothing. we'll try again later
                         ;
                     }
 
                     if (mResolutionPhase == nsForwardReference::eStart) {
                         // Resolve() loaded a dynamic overlay,
                         // (see XULDocument::LoadOverlayInternal()).
                         // Return for now, we will be called again.
-                        return rv;
+                        return NS_OK;
                     }
                 }
             }
         }
 
         ++pass;
     }
 
     mForwardReferences.Clear();
-    return rv;
+    return NS_OK;
 }
 
 NS_IMETHODIMP
 XULDocument::GetScriptGlobalObjectOwner(nsIScriptGlobalObjectOwner** aGlobalOwner)
 {
     NS_IF_ADDREF(*aGlobalOwner = mMasterPrototype);
     return NS_OK;
 }
@@ -3869,20 +3866,18 @@ XULDocument::CreateTemplateBuilder(nsICo
     else {
         // Create and initialize a content builder.
         nsCOMPtr<nsIXULTemplateBuilder> builder
             = do_CreateInstance("@mozilla.org/xul/xul-template-builder;1");
 
         if (! builder)
             return NS_ERROR_FAILURE;
 
-        nsresult rv = builder->Init(aElement);
-        NS_ENSURE_SUCCESS(rv, rv);
-        rv = builder->CreateContents(aElement, false);
-        NS_ENSURE_SUCCESS(rv, rv);
+        builder->Init(aElement);
+        builder->CreateContents(aElement, false);
     }
 
     return NS_OK;
 }
 
 
 nsresult
 XULDocument::AddPrototypeSheets()
--- a/content/xul/templates/src/nsXULTemplateBuilder.cpp
+++ b/content/xul/templates/src/nsXULTemplateBuilder.cpp
@@ -1238,18 +1238,17 @@ nsXULTemplateBuilder::LoadDataSources(ns
     // access it.
     nsCOMPtr<nsIXULDocument> xuldoc = do_QueryInterface(aDocument);
     if (xuldoc)
         xuldoc->SetTemplateBuilderFor(mRoot, this);
 
     if (!mRoot->IsXUL()) {
         // Hmm. This must be an HTML element. Try to set it as a
         // JS property "by hand".
-        rv = InitHTMLTemplateRoot();
-        NS_ENSURE_SUCCESS(rv, rv);
+        InitHTMLTemplateRoot();
     }
   
     return NS_OK;
 }
   
 nsresult
 nsXULTemplateBuilder::LoadDataSourceUrls(nsIDocument* aDocument,
                                          const nsAString& aDataSources,
--- a/js/xpconnect/wrappers/WrapperFactory.cpp
+++ b/js/xpconnect/wrappers/WrapperFactory.cpp
@@ -292,36 +292,36 @@ WrapperFactory::PrepareForWrapping(JSCon
 
     // This public WrapNativeToJSVal API enters the compartment of 'wrapScope'
     // so we don't have to.
     RootedValue v(cx);
     nsresult rv =
         nsXPConnect::XPConnect()->WrapNativeToJSVal(cx, wrapScope, wn->Native(), nullptr,
                                                     &NS_GET_IID(nsISupports), false,
                                                     v.address(), getter_AddRefs(holder));
-    NS_ENSURE_SUCCESS(rv, nullptr);
-
-    obj = JSVAL_TO_OBJECT(v);
-    NS_ASSERTION(IS_WN_WRAPPER(obj), "bad object");
+    if (NS_SUCCEEDED(rv)) {
+        obj = JSVAL_TO_OBJECT(v);
+        NS_ASSERTION(IS_WN_WRAPPER(obj), "bad object");
 
-    // Because the underlying native didn't have a PreCreate hook, we had
-    // to a new (or possibly pre-existing) XPCWN in our compartment.
-    // This could be a problem for chrome code that passes XPCOM objects
-    // across compartments, because the effects of QI would disappear across
-    // compartments.
-    //
-    // So whenever we pull an XPCWN across compartments in this manner, we
-    // give the destination object the union of the two native sets. We try
-    // to do this cleverly in the common case to avoid too much overhead.
-    XPCWrappedNative *newwn = static_cast<XPCWrappedNative *>(xpc_GetJSPrivate(obj));
-    XPCNativeSet *unionSet = XPCNativeSet::GetNewOrUsed(ccx, newwn->GetSet(),
-                                                        wn->GetSet(), false);
-    if (!unionSet)
-        return nullptr;
-    newwn->SetSet(unionSet);
+        // Because the underlying native didn't have a PreCreate hook, we had
+        // to a new (or possibly pre-existing) XPCWN in our compartment.
+        // This could be a problem for chrome code that passes XPCOM objects
+        // across compartments, because the effects of QI would disappear across
+        // compartments.
+        //
+        // So whenever we pull an XPCWN across compartments in this manner, we
+        // give the destination object the union of the two native sets. We try
+        // to do this cleverly in the common case to avoid too much overhead.
+        XPCWrappedNative *newwn = static_cast<XPCWrappedNative *>(xpc_GetJSPrivate(obj));
+        XPCNativeSet *unionSet = XPCNativeSet::GetNewOrUsed(ccx, newwn->GetSet(),
+                                                            wn->GetSet(), false);
+        if (!unionSet)
+            return nullptr;
+        newwn->SetSet(unionSet);
+    }
 
     return DoubleWrap(cx, obj, flags);
 }
 
 #ifdef DEBUG
 static void
 DEBUG_CheckUnwrapSafety(HandleObject obj, js::Wrapper *handler,
                         JSCompartment *origin, JSCompartment *target)