Bug 1132358 - Save and restore mIterGenCnt. Keep it consistent with mIter. r=mcmanus, a=lmandel
authorHenry Hu <henry.hu.sh@gmail.com>
Fri, 20 Feb 2015 15:13:39 -0500
changeset 251705 386a573b4fc0049a7d61d361d95d0ba0bcb589b7
parent 251704 97f402db19a400fb01c67fe736ebb9de59aedd55
child 251706 4564e0e22a37840925ce8b72965d4ff294648825
push id698
push userjlund@mozilla.com
push dateMon, 23 Mar 2015 22:08:11 +0000
treeherdermozilla-release@b0c0ae7b02a3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmcmanus, lmandel
bugs1132358
milestone37.0
Bug 1132358 - Save and restore mIterGenCnt. Keep it consistent with mIter. r=mcmanus, a=lmandel
netwerk/dns/nsDNSService2.cpp
--- a/netwerk/dns/nsDNSService2.cpp
+++ b/netwerk/dns/nsDNSService2.cpp
@@ -204,21 +204,23 @@ NS_IMETHODIMP
 nsDNSRecord::HasMore(bool *result)
 {
     if (mDone) {
         *result = false;
         return NS_OK;
     }
 
     NetAddrElement *iterCopy = mIter;
+    int iterGenCntCopy = mIterGenCnt;
 
     NetAddr addr;
     *result = NS_SUCCEEDED(GetNextAddr(0, &addr));
 
     mIter = iterCopy;
+    mIterGenCnt = iterGenCntCopy;
     mDone = false;
 
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsDNSRecord::Rewind()
 {