#361: fix stupid bug with WiFi scanning

This commit is contained in:
Cameron Kaiser 2018-07-14 12:31:21 -07:00
parent 9620d6aa0b
commit e8ee244caa
1 changed files with 7 additions and 3 deletions

View File

@ -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();
}