Removed unnecessary IsNeckoChild() call per bug 1343489 draft
authorNick <nick@foxsec.io>
Wed, 01 Mar 2017 10:11:29 -0500
changeset 490927 f58fb8e75a4d3e4bb908104295d004d0534f6660
parent 490871 34c6c2f302e7b48e3ad2cec575cbd34d423a9d32
child 490973 93b7a206a551c4f2a72f12dfb1b1874842444c74
child 491133 f89b98c8eded296bac8442da2a6dd59a2c124627
push id47278
push userbmo:nick@foxsec.io
push dateWed, 01 Mar 2017 15:12:05 +0000
bugs1343489
milestone54.0a1
Removed unnecessary IsNeckoChild() call per bug 1343489 MozReview-Commit-ID: 8szo8dfDNMq
netwerk/protocol/http/nsHttpHandler.cpp
--- a/netwerk/protocol/http/nsHttpHandler.cpp
+++ b/netwerk/protocol/http/nsHttpHandler.cpp
@@ -2252,24 +2252,23 @@ nsHttpHandler::SpeculativeConnectInterna
 
     MOZ_ASSERT(NS_IsMainThread());
     nsCOMPtr<nsIObserverService> obsService = services::GetObserverService();
     if (mDebugObservations && obsService) {
         // this is basically used for test coverage of an otherwise 'hintable'
         // feature
         obsService->NotifyObservers(nullptr, "speculative-connect-request",
                                     nullptr);
-        if (!IsNeckoChild()) {
-            for (auto* cp : dom::ContentParent::AllProcesses(dom::ContentParent::eLive)) {
-                PNeckoParent* neckoParent = SingleManagedOrNull(cp->ManagedPNeckoParent());
-                if (!neckoParent) {
-                    continue;
-                }
-                Unused << neckoParent->SendSpeculativeConnectRequest();
+
+        for (auto* cp : dom::ContentParent::AllProcesses(dom::ContentParent::eLive)) {
+            PNeckoParent* neckoParent = SingleManagedOrNull(cp->ManagedPNeckoParent());
+            if (!neckoParent) {
+                continue;
             }
+            Unused << neckoParent->SendSpeculativeConnectRequest();
         }
     }
 
     nsISiteSecurityService* sss = gHttpHandler->GetSSService();
     bool isStsHost = false;
     if (!sss)
         return NS_OK;