From 4b4edc81af440ec9f6c08cb6c56017fe52c555a9 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. Fixed bug 21861 (Disable additional mDNS code to avoid proxy bypasses) as well. --- browser/installer/package-manifest.in | 5 --- .../PresentationDeviceProviderModule.cpp | 2 +- dom/presentation/provider/moz.build | 16 ---------- mobile/android/installer/package-manifest.in | 6 ---- netwerk/dns/mdns/libmdns/moz.build | 32 +++---------------- .../dns/mdns/libmdns/nsMulticastDNSModule.cpp | 2 +- 6 files changed, 7 insertions(+), 56 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/dom/presentation/provider/moz.build b/dom/presentation/provider/moz.build index 18428b50ed138..7f82700648e57 100644 --- a/dom/presentation/provider/moz.build +++ b/dom/presentation/provider/moz.build @@ -12,8 +12,6 @@ EXTRA_COMPONENTS += [ UNIFIED_SOURCES += [ 'DeviceProviderHelpers.cpp', 'DisplayDeviceProvider.cpp', - 'MulticastDNSDeviceProvider.cpp', - 'PresentationDeviceProviderModule.cpp', ] EXTRA_JS_MODULES.presentation += [ @@ -22,19 +20,5 @@ EXTRA_JS_MODULES.presentation += [ 'StateMachineHelper.jsm', ] -if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android': - EXTRA_COMPONENTS += [ - # For android presentation device - 'AndroidCastDeviceProvider.js', - 'AndroidCastDeviceProvider.manifest', - # for TV 2.5 device backward capability - 'LegacyPresentationControlService.js', - 'LegacyProviders.manifest', - ] - - UNIFIED_SOURCES += [ - 'LegacyMDNSDeviceProvider.cpp', - ] - include('/ipc/chromium/chromium-config.mozbuild') FINAL_LIBRARY = 'xul' diff --git a/mobile/android/installer/package-manifest.in b/mobile/android/installer/package-manifest.in index a643ea243d76e..025094cd75965 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 @@ -406,10 +404,6 @@ @BINPATH@/components/PresentationNetworkHelper.manifest @BINPATH@/components/PresentationDataChannelSessionTransport.js @BINPATH@/components/PresentationDataChannelSessionTransport.manifest -@BINPATH@/components/LegacyProviders.manifest -@BINPATH@/components/LegacyPresentationControlService.js -@BINPATH@/components/AndroidCastDeviceProvider.manifest -@BINPATH@/components/AndroidCastDeviceProvider.js @BINPATH@/components/TVSimulatorService.js @BINPATH@/components/TVSimulatorService.manifest diff --git a/netwerk/dns/mdns/libmdns/moz.build b/netwerk/dns/mdns/libmdns/moz.build index d2dca4955fd9d..422621f4b61a7 100644 --- a/netwerk/dns/mdns/libmdns/moz.build +++ b/netwerk/dns/mdns/libmdns/moz.build @@ -4,8 +4,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 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', @@ -13,36 +12,15 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa' or \ ] LOCAL_INCLUDES += [ - '/netwerk/base', - ] - - if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk': - LOCAL_INCLUDES += [ - '%' + '%s/%s' % (CONFIG['ANDROID_SOURCE'], d) for d in [ - 'external/mdnsresponder/mDNSShared', - ] + '%' + '%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', - 'fallback/DNSPacket.jsm', - 'fallback/DNSRecord.jsm', - 'fallback/DNSResourceRecord.jsm', - 'fallback/DNSTypes.jsm', - 'fallback/MulticastDNS.jsm', + LOCAL_INCLUDES += [ + '/netwerk/base', ] - if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android': - EXTRA_JS_MODULES += [ - 'MulticastDNSAndroid.jsm', - ] UNIFIED_SOURCES += [ 'nsDNSServiceInfo.cpp', 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