Bug 1586845, r=dragana, a=lizzard
authorHonza Bambas <honzab.moz@firemni.cz>
Wed, 09 Oct 2019 15:58:18 +0000
changeset 552368 2ce58a99cbfdbebff2ff4c878accfffcd1170bd2
parent 552367 01fd845cda3ff35e3efc685c9601107989d90eea
child 552369 6ded012831a7ee937bcb474ec50f44c3fa937653
push id12155
push userjcristau@mozilla.com
push dateThu, 10 Oct 2019 14:13:03 +0000
treeherdermozilla-beta@2ce58a99cbfd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdragana, lizzard
bugs1586845
milestone70.0
Bug 1586845, r=dragana, a=lizzard Differential Revision: https://phabricator.services.mozilla.com/D48395
netwerk/dns/nsHostResolver.cpp
--- a/netwerk/dns/nsHostResolver.cpp
+++ b/netwerk/dns/nsHostResolver.cpp
@@ -1106,22 +1106,23 @@ nsresult nsHostResolver::ResolveHost(con
             rec->remove();
             mMediumQ.insertBack(rec);
             rec->flags = flags;
             mIdleTaskCV.Notify();
           }
         }
       }
     }
-  }
+
+    if (result && callback->isInList()) {
+      callback->remove();
+    }
+  }  // lock
 
   if (result) {
-    if (callback->isInList()) {
-      callback->remove();
-    }
     callback->OnResolveHostComplete(this, result, status);
   }
 
   return rv;
 }
 
 void nsHostResolver::DetachCallback(const nsACString& host, uint16_t aType,
                                     const OriginAttributes& aOriginAttributes,