Bug 1190608, part 5 - Sink the declaration of i in nsXULElement.cpp. r=poiru
authorAndrew McCreight <continuation@gmail.com>
Tue, 04 Aug 2015 13:06:15 -0700
changeset 287851 de90e543e4f237e08d3938284a2a9cd229abb9e5
parent 287850 93bc28d6facd9abd380159b511eb6bd2567b73bb
child 287852 2f1a37cb43ac223d59417df5e0e930ff01e53cfe
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 5 - Sink the declaration of i in nsXULElement.cpp. r=poiru
dom/xul/nsXULElement.cpp
--- a/dom/xul/nsXULElement.cpp
+++ b/dom/xul/nsXULElement.cpp
@@ -2285,25 +2285,24 @@ nsXULPrototypeElement::Deserialize(nsIOb
 
     // 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) {
             return NS_ERROR_OUT_OF_MEMORY;
         }
 
         nsAutoString attributeValue;
-        for (i = 0; i < mNumAttributes; ++i) {
+        for (uint32_t 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) {
                 return NS_ERROR_UNEXPECTED;
             }
@@ -2325,17 +2324,17 @@ nsXULPrototypeElement::Deserialize(nsIOb
     if (NS_FAILED(tmp)) {
       rv = tmp;
     }
     uint32_t numChildren = int32_t(number);
 
     if (numChildren > 0) {
         mChildren.SetCapacity(numChildren);
 
-        for (i = 0; i < numChildren; i++) {
+        for (uint32_t i = 0; i < numChildren; i++) {
             tmp = aStream->Read32(&number);
             if (NS_FAILED(tmp)) {
               rv = tmp;
             }
             Type childType = (Type)number;
 
             nsRefPtr<nsXULPrototypeNode> child;