From 6971a0e5fa90ca0d7ed5ae55af5564d4b8bea50a Mon Sep 17 00:00:00 2001 From: Georg Koppen Date: Wed, 20 Apr 2016 14:34:50 +0000 Subject: [PATCH] Bug 18821: Disable libmdns for Android and Desktop There should be no need to remove the OS X support introduced in https://bugzilla.mozilla.org/show_bug.cgi?id=1225726 as enabling this is governed by a preference (which is actually set to `false`). However, we remove it at build time as well (defense in depth). This is basically a backout of the relevant passages of https://hg.mozilla.org/mozilla-central/rev/6bfb430de85d, https://hg.mozilla.org/mozilla-central/rev/609b337bf7ab and https://hg.mozilla.org/mozilla-central/rev/8e092ec5fbbd. --- browser/installer/package-manifest.in | 5 ----- .../PresentationDeviceProviderModule.cpp | 2 +- mobile/android/installer/package-manifest.in | 2 -- netwerk/dns/mdns/libmdns/moz.build | 20 +++++++------------ .../dns/mdns/libmdns/nsMulticastDNSModule.cpp | 2 +- 5 files changed, 9 insertions(+), 22 deletions(-) diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in index 8977706b88d51..8192f93b20e97 100644 --- a/browser/installer/package-manifest.in +++ b/browser/installer/package-manifest.in @@ -355,11 +355,6 @@ @RESPATH@/components/FeedProcessor.js @RESPATH@/components/WellKnownOpportunisticUtils.js @RESPATH@/components/WellKnownOpportunisticUtils.manifest -#ifndef XP_MACOSX -; OSX uses native platform impl. Windows, Linux, and Android uses fallback JS impl. -@BINPATH@/components/nsDNSServiceDiscovery.manifest -@BINPATH@/components/nsDNSServiceDiscovery.js -#endif @RESPATH@/browser/components/BrowserFeeds.manifest @RESPATH@/browser/components/FeedConverter.js @RESPATH@/browser/components/FeedWriter.js diff --git a/dom/presentation/provider/PresentationDeviceProviderModule.cpp b/dom/presentation/provider/PresentationDeviceProviderModule.cpp index 9100fa49bdcc7..52f85de339baf 100644 --- a/dom/presentation/provider/PresentationDeviceProviderModule.cpp +++ b/dom/presentation/provider/PresentationDeviceProviderModule.cpp @@ -68,7 +68,7 @@ static const mozilla::Module::ContractIDEntry kPresentationDeviceProviderContrac }; static const mozilla::Module::CategoryEntry kPresentationDeviceProviderCategories[] = { -#if defined(MOZ_WIDGET_COCOA) || defined(MOZ_WIDGET_ANDROID) || (defined(MOZ_WIDGET_GONK) && ANDROID_VERSION >= 16) +#if defined(MOZ_WIDGET_GONK) && ANDROID_VERSION >= 16 { PRESENTATION_DEVICE_PROVIDER_CATEGORY, "MulticastDNSDeviceProvider", MULTICAST_DNS_PROVIDER_CONTRACT_ID }, #endif #if defined(MOZ_WIDGET_GONK) diff --git a/mobile/android/installer/package-manifest.in b/mobile/android/installer/package-manifest.in index a643ea243d76e..417d34a0679bd 100644 --- a/mobile/android/installer/package-manifest.in +++ b/mobile/android/installer/package-manifest.in @@ -289,8 +289,6 @@ @BINPATH@/components/PermissionSettings.manifest @BINPATH@/components/PermissionPromptService.js @BINPATH@/components/PermissionPromptService.manifest -@BINPATH@/components/nsDNSServiceDiscovery.manifest -@BINPATH@/components/nsDNSServiceDiscovery.js @BINPATH@/components/toolkitsearch.manifest @BINPATH@/components/nsSearchService.js @BINPATH@/components/nsSidebar.js diff --git a/netwerk/dns/mdns/libmdns/moz.build b/netwerk/dns/mdns/libmdns/moz.build index d2dca4955fd9d..f14e411096d89 100644 --- a/netwerk/dns/mdns/libmdns/moz.build +++ b/netwerk/dns/mdns/libmdns/moz.build @@ -4,31 +4,25 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. -if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa' or \ - (CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk' and CONFIG['ANDROID_VERSION'] >= '16'): +if (CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk' and CONFIG['ANDROID_VERSION'] >= '16'): UNIFIED_SOURCES += [ 'MDNSResponderOperator.cpp', 'MDNSResponderReply.cpp', 'nsDNSServiceDiscovery.cpp', ] + LOCAL_INCLUDES += [ + '%' + '%s/%s' % (CONFIG['ANDROID_SOURCE'], d) for d in [ + 'external/mdnsresponder/mDNSShared', + ] + ] + LOCAL_INCLUDES += [ '/netwerk/base', ] - if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk': - LOCAL_INCLUDES += [ - '%' + '%s/%s' % (CONFIG['ANDROID_SOURCE'], d) for d in [ - 'external/mdnsresponder/mDNSShared', - ] - ] else: - EXTRA_COMPONENTS += [ - 'nsDNSServiceDiscovery.js', - 'nsDNSServiceDiscovery.manifest', - ] - EXTRA_JS_MODULES += [ 'fallback/DataReader.jsm', 'fallback/DataWriter.jsm', diff --git a/netwerk/dns/mdns/libmdns/nsMulticastDNSModule.cpp b/netwerk/dns/mdns/libmdns/nsMulticastDNSModule.cpp index 22bad3bc754e6..1ab3993e762cb 100644 --- a/netwerk/dns/mdns/libmdns/nsMulticastDNSModule.cpp +++ b/netwerk/dns/mdns/libmdns/nsMulticastDNSModule.cpp @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#if defined(MOZ_WIDGET_COCOA) || (defined(MOZ_WIDGET_GONK) && ANDROID_VERSION >= 16) +#if defined(MOZ_WIDGET_GONK) && ANDROID_VERSION >= 16 #define ENABLE_DNS_SERVICE_DISCOVERY #endif -- GitLab