From e8ee244caa0390173415032de6e4b6844627b083 Mon Sep 17 00:00:00 2001 From: Cameron Kaiser Date: Sat, 14 Jul 2018 12:31:21 -0700 Subject: [PATCH] #361: fix stupid bug with WiFi scanning --- netwerk/wifi/nsWifiScannerMac.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/netwerk/wifi/nsWifiScannerMac.cpp b/netwerk/wifi/nsWifiScannerMac.cpp index 8aa3e1b7a..497c125b2 100644 --- a/netwerk/wifi/nsWifiScannerMac.cpp +++ b/netwerk/wifi/nsWifiScannerMac.cpp @@ -161,8 +161,12 @@ nsresult nsWifiMonitor::DoScan() { // See bug 848435. Since we sort of support running under Rosetta on Snow - // Leopard, we need to still support that path, sort of. + // Leopard, we need to still support that path, sort of. Here's a better + // fix, from TenFourFox issue 361. extern bool WiFiUsingSnowLeopard(); - return (WiFiUsingSnowLeopard()) ? DoScanOld() : DoScanWithCoreWLAN(); + if (MOZ_UNLIKELY(WiFiUsingSnowLeopard())) { + nsresult rv = DoScanWithCoreWLAN(); + if (NS_SUCCEEDED(rv)) return rv; + } + return DoScanOld(); } -