Bug 1190608, part 4 - Brace a few ifs in nsXULElement.cpp. r=poiru
authorAndrew McCreight <continuation@gmail.com>
Tue, 04 Aug 2015 13:06:14 -0700
changeset 287850 93bc28d6facd9abd380159b511eb6bd2567b73bb
parent 287849 f1579da7f21e0e2fa602061092d2f82ecc3a7dcc
child 287851 de90e543e4f237e08d3938284a2a9cd229abb9e5
push id5067
push userraliiev@mozilla.com
push dateMon, 21 Sep 2015 14:04:52 +0000
treeherdermozilla-beta@14221ffe5b2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspoiru
bugs1190608
milestone42.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 1190608, part 4 - Brace a few ifs in nsXULElement.cpp. r=poiru
dom/xul/nsXULElement.cpp
--- a/dom/xul/nsXULElement.cpp
+++ b/dom/xul/nsXULElement.cpp
@@ -2274,41 +2274,44 @@ nsXULPrototypeElement::Deserialize(nsIOb
                                    const nsTArray<nsRefPtr<mozilla::dom::NodeInfo>> *aNodeInfos)
 {
     NS_PRECONDITION(aNodeInfos, "missing nodeinfo array");
 
     // Read Node Info
     uint32_t number = 0;
     nsresult rv = aStream->Read32(&number);
     mNodeInfo = aNodeInfos->SafeElementAt(number, nullptr);
-    if (!mNodeInfo)
+    if (!mNodeInfo) {
         return NS_ERROR_UNEXPECTED;
+    }
 
     // Read Attributes
     nsresult tmp = aStream->Read32(&number);
     if (NS_FAILED(tmp)) {
       rv = tmp;
     }
     mNumAttributes = int32_t(number);
 
     uint32_t i;
     if (mNumAttributes > 0) {
         mAttributes = new (fallible) nsXULPrototypeAttribute[mNumAttributes];
-        if (! mAttributes)
+        if (!mAttributes) {
             return NS_ERROR_OUT_OF_MEMORY;
+        }
 
         nsAutoString attributeValue;
         for (i = 0; i < mNumAttributes; ++i) {
             tmp = aStream->Read32(&number);
             if (NS_FAILED(tmp)) {
               rv = tmp;
             }
             mozilla::dom::NodeInfo* ni = aNodeInfos->SafeElementAt(number, nullptr);
-            if (!ni)
+            if (!ni) {
                 return NS_ERROR_UNEXPECTED;
+            }
 
             mAttributes[i].mName.SetTo(ni);
 
             tmp = aStream->ReadString(attributeValue);
             if (NS_FAILED(tmp)) {
               rv = tmp;
             }
             tmp = SetAttrAt(i, attributeValue, aDocumentURI);