Bug 853569 - Fix nsTArray::SetCapacity callers in nsXULContentSink to not look at the return value; r=bzbarsky
authorEhsan Akhgari <ehsan@mozilla.com>
Thu, 21 Mar 2013 14:54:36 -0400
changeset 125830 fa5fce9ac1e3e7b5646a60a53eaa0e5ad7d3327b
parent 125829 89f1f298226ef8552156b902fdda4da478f21e27
child 125831 d25e0d89cc5b5bce7ad51da7b4f9b142cb9b76ea
push id25111
push usereakhgari@mozilla.com
push dateThu, 21 Mar 2013 20:06:25 +0000
treeherdermozilla-inbound@b06530d4fb32 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbzbarsky
bugs853569
milestone22.0a1
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
Bug 853569 - Fix nsTArray::SetCapacity callers in nsXULContentSink to not look at the return value; r=bzbarsky
content/xul/document/src/nsXULContentSink.cpp
--- a/content/xul/document/src/nsXULContentSink.cpp
+++ b/content/xul/document/src/nsXULContentSink.cpp
@@ -543,18 +543,17 @@ XULContentSinkImpl::HandleEndElement(con
         rv = mContextStack.GetTopChildren(&children);
         if (NS_FAILED(rv)) return rv;
 
         nsXULPrototypeElement* element =
           static_cast<nsXULPrototypeElement*>(node.get());
 
         int32_t count = children->Length();
         if (count) {
-            if (!element->mChildren.SetCapacity(count))
-                return NS_ERROR_OUT_OF_MEMORY;
+            element->mChildren.SetCapacity(count);
 
             for (int32_t i = 0; i < count; ++i)
                 element->mChildren.AppendElement(children->ElementAt(i));
 
         }
     }
     break;