Bug 1391467 - Remove --enable-necko-protocols. r?mcmanus,gps draft
authorNicholas Hurley <hurley@mozilla.com>
Thu, 17 Aug 2017 17:30:57 -0700
changeset 649246 c84c226b919eeba19188a68f86db49b3ba481b22
parent 648571 2fb6d8f7bac1be26b2b49b68fc34cc6decd7f339
child 727050 3d9cbb283cd7a05b42290f8e3a9ef2be8aa23a53
push id75001
push userbmo:hurley@mozilla.com
push dateFri, 18 Aug 2017 21:58:43 +0000
reviewersmcmanus, gps
bugs1391467, 1295885
milestone57.0a1
Bug 1391467 - Remove --enable-necko-protocols. r?mcmanus,gps This patch removes the ability to select which protocols you want included in necko, a wholly untested configuration that is broken in practice. We have no need of this kind of configurability in necko. In addition, this removes the final vestiges of rtsp support, which was originally removed in bug 1295885 but still had some stuff hanging around behind some ifdefs (that were never true). MozReview-Commit-ID: KOEaDmit2IL
dom/media/MediaResource.h
layout/build/nsLayoutModule.cpp
netwerk/base/StreamingProtocolService.cpp
netwerk/base/StreamingProtocolService.h
netwerk/base/moz.build
netwerk/base/nsIStreamingProtocolController.idl
netwerk/base/nsIStreamingProtocolService.idl
netwerk/build/moz.build
netwerk/build/nsNetCID.h
netwerk/build/nsNetModule.cpp
netwerk/ipc/NeckoChannelParams.ipdlh
netwerk/ipc/NeckoChild.cpp
netwerk/ipc/NeckoChild.h
netwerk/ipc/NeckoParent.cpp
netwerk/ipc/NeckoParent.h
netwerk/ipc/PNecko.ipdl
netwerk/ipc/PRtspChannel.ipdl
netwerk/ipc/PRtspController.ipdl
netwerk/ipc/moz.build
netwerk/necko-config.h.in
netwerk/protocol/moz.build
netwerk/streamconv/converters/moz.build
python/mozbuild/mozbuild/frontend/reader.py
python/mozbuild/mozbuild/test/configure/test_toolkit_moz_configure.py
toolkit/library/moz.build
toolkit/moz.configure
--- a/dom/media/MediaResource.h
+++ b/dom/media/MediaResource.h
@@ -5,17 +5,16 @@
 
 #if !defined(MediaResource_h_)
 #define MediaResource_h_
 
 #include "mozilla/Mutex.h"
 #include "nsIChannel.h"
 #include "nsIURI.h"
 #include "nsISeekableStream.h"
-#include "nsIStreamingProtocolController.h"
 #include "nsIStreamListener.h"
 #include "nsIChannelEventSink.h"
 #include "nsIInterfaceRequestor.h"
 #include "Intervals.h"
 #include "MediaCache.h"
 #include "MediaContainerType.h"
 #include "MediaData.h"
 #include "MediaPrefs.h"
--- a/layout/build/nsLayoutModule.cpp
+++ b/layout/build/nsLayoutModule.cpp
@@ -171,17 +171,16 @@ static void Shutdown();
 
 #include "AudioChannelService.h"
 #include "mozilla/net/WebSocketEventService.h"
 
 #include "mozilla/dom/FlyWebService.h"
 
 #include "mozilla/dom/power/PowerManagerService.h"
 #include "mozilla/dom/time/TimeService.h"
-#include "StreamingProtocolService.h"
 
 #include "nsIPresentationService.h"
 
 #include "MediaManager.h"
 
 #include "GMPService.h"
 
 #include "mozilla/dom/PresentationDeviceManager.h"
@@ -194,17 +193,16 @@ static void Shutdown();
 using namespace mozilla;
 using namespace mozilla::dom;
 using mozilla::dom::power::PowerManagerService;
 using mozilla::dom::quota::QuotaManagerService;
 using mozilla::dom::workers::ServiceWorkerManager;
 using mozilla::dom::workers::WorkerDebuggerManager;
 using mozilla::dom::UDPSocketChild;
 using mozilla::dom::time::TimeService;
-using mozilla::net::StreamingProtocolControllerService;
 using mozilla::gmp::GeckoMediaPluginService;
 using mozilla::dom::NotificationTelemetryService;
 
 #define NS_EDITORCOMMANDTABLE_CID \
 { 0x4f5e62b8, 0xd659, 0x4156, \
   { 0x84, 0xfc, 0x2f, 0x60, 0x99, 0x40, 0x03, 0x69 } }
 
 #define NS_EDITINGCOMMANDTABLE_CID \
@@ -274,18 +272,16 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsDeviceS
 #if defined(ANDROID)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsHapticFeedback)
 #endif
 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(ThirdPartyUtil, Init)
 NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsIPowerManagerService,
                                          PowerManagerService::GetInstance)
 NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsITimeService,
                                          TimeService::GetInstance)
-NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsIStreamingProtocolControllerService,
-                                         StreamingProtocolControllerService::GetInstance)
 
 NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsIMediaManagerService,
                                          MediaManager::GetInstance)
 NS_GENERIC_FACTORY_CONSTRUCTOR(PresentationDeviceManager)
 NS_GENERIC_FACTORY_CONSTRUCTOR(TextInputProcessor)
 NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsIPresentationService,
                                          NS_CreatePresentationService)
 NS_GENERIC_FACTORY_CONSTRUCTOR(PresentationTCPSessionTransport)
@@ -681,17 +677,16 @@ NS_DEFINE_NAMED_CID(NS_STRUCTUREDCLONECO
 NS_DEFINE_NAMED_CID(NS_DEVICE_SENSORS_CID);
 #if defined(ANDROID)
 NS_DEFINE_NAMED_CID(NS_HAPTICFEEDBACK_CID);
 #endif
 NS_DEFINE_NAMED_CID(NS_POWERMANAGERSERVICE_CID);
 NS_DEFINE_NAMED_CID(OSFILECONSTANTSSERVICE_CID);
 NS_DEFINE_NAMED_CID(UDPSOCKETCHILD_CID);
 NS_DEFINE_NAMED_CID(NS_TIMESERVICE_CID);
-NS_DEFINE_NAMED_CID(NS_MEDIASTREAMCONTROLLERSERVICE_CID);
 NS_DEFINE_NAMED_CID(NS_MEDIAMANAGERSERVICE_CID);
 #ifdef MOZ_WEBSPEECH_TEST_BACKEND
 NS_DEFINE_NAMED_CID(NS_FAKE_SPEECH_RECOGNITION_SERVICE_CID);
 #endif
 #ifdef MOZ_WEBSPEECH_POCKETSPHINX
 NS_DEFINE_NAMED_CID(NS_POCKETSPHINX_SPEECH_RECOGNITION_SERVICE_CID);
 #endif
 #ifdef MOZ_WEBSPEECH
@@ -955,17 +950,16 @@ static const mozilla::Module::CIDEntry k
 #endif
   { &kTHIRDPARTYUTIL_CID, false, nullptr, ThirdPartyUtilConstructor },
   { &kNS_STRUCTUREDCLONECONTAINER_CID, false, nullptr, nsStructuredCloneContainerConstructor },
   { &kNS_POWERMANAGERSERVICE_CID, false, nullptr, nsIPowerManagerServiceConstructor, Module::ALLOW_IN_GPU_PROCESS },
   { &kOSFILECONSTANTSSERVICE_CID, true, nullptr, OSFileConstantsServiceConstructor },
   { &kUDPSOCKETCHILD_CID, false, nullptr, UDPSocketChildConstructor },
   { &kGECKO_MEDIA_PLUGIN_SERVICE_CID, true, nullptr, GeckoMediaPluginServiceConstructor },
   { &kNS_TIMESERVICE_CID, false, nullptr, nsITimeServiceConstructor },
-  { &kNS_MEDIASTREAMCONTROLLERSERVICE_CID, false, nullptr, nsIStreamingProtocolControllerServiceConstructor },
   { &kNS_MEDIAMANAGERSERVICE_CID, false, nullptr, nsIMediaManagerServiceConstructor },
 #ifdef ACCESSIBILITY
   { &kNS_ACCESSIBILITY_SERVICE_CID, false, nullptr, CreateA11yService },
 #endif
   { &kPRESENTATION_SERVICE_CID, false, nullptr, nsIPresentationServiceConstructor },
   { &kPRESENTATION_DEVICE_MANAGER_CID, false, nullptr, PresentationDeviceManagerConstructor },
   { &kPRESENTATION_TCP_SESSION_TRANSPORT_CID, false, nullptr, PresentationTCPSessionTransportConstructor },
   { &kTEXT_INPUT_PROCESSOR_CID, false, nullptr, TextInputProcessorConstructor },
@@ -1084,17 +1078,16 @@ static const mozilla::Module::ContractID
   { "@mozilla.org/widget/hapticfeedback;1", &kNS_HAPTICFEEDBACK_CID },
 #endif
   { THIRDPARTYUTIL_CONTRACTID, &kTHIRDPARTYUTIL_CID },
   { NS_STRUCTUREDCLONECONTAINER_CONTRACTID, &kNS_STRUCTUREDCLONECONTAINER_CID },
   { POWERMANAGERSERVICE_CONTRACTID, &kNS_POWERMANAGERSERVICE_CID, Module::ALLOW_IN_GPU_PROCESS },
   { OSFILECONSTANTSSERVICE_CONTRACTID, &kOSFILECONSTANTSSERVICE_CID },
   { "@mozilla.org/udp-socket-child;1", &kUDPSOCKETCHILD_CID },
   { TIMESERVICE_CONTRACTID, &kNS_TIMESERVICE_CID },
-  { MEDIASTREAMCONTROLLERSERVICE_CONTRACTID, &kNS_MEDIASTREAMCONTROLLERSERVICE_CID },
   { MEDIAMANAGERSERVICE_CONTRACTID, &kNS_MEDIAMANAGERSERVICE_CID },
 #ifdef ACCESSIBILITY
   { "@mozilla.org/accessibilityService;1", &kNS_ACCESSIBILITY_SERVICE_CID },
   { "@mozilla.org/accessibleRetrieval;1", &kNS_ACCESSIBILITY_SERVICE_CID },
 #endif
   { "@mozilla.org/gecko-media-plugin-service;1",  &kGECKO_MEDIA_PLUGIN_SERVICE_CID },
   { PRESENTATION_SERVICE_CONTRACTID, &kPRESENTATION_SERVICE_CID },
   { PRESENTATION_DEVICE_MANAGER_CONTRACTID, &kPRESENTATION_DEVICE_MANAGER_CID },
deleted file mode 100644
--- a/netwerk/base/StreamingProtocolService.cpp
+++ /dev/null
@@ -1,72 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * 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/. */
-
-#include "base/basictypes.h"
-#include "mozilla/ClearOnShutdown.h"
-#include "StreamingProtocolService.h"
-#include "mozilla/net/NeckoChild.h"
-#include "nsIURI.h"
-#include "necko-config.h"
-
-#ifdef NECKO_PROTOCOL_rtsp
-#include "RtspControllerChild.h"
-#include "RtspController.h"
-#endif
-
-namespace mozilla {
-namespace net {
-
-NS_IMPL_ISUPPORTS(StreamingProtocolControllerService,
-                  nsIStreamingProtocolControllerService)
-
-/* static */
-StaticRefPtr<StreamingProtocolControllerService> sSingleton;
-
-/* static */
-already_AddRefed<StreamingProtocolControllerService>
-StreamingProtocolControllerService::GetInstance()
-{
-  if (!sSingleton) {
-    sSingleton = new StreamingProtocolControllerService();
-    ClearOnShutdown(&sSingleton);
-  }
-  RefPtr<StreamingProtocolControllerService> service = sSingleton.get();
-  return service.forget();
-}
-
-NS_IMETHODIMP
-StreamingProtocolControllerService::Create(nsIChannel *aChannel, nsIStreamingProtocolController **aResult)
-{
-  RefPtr<nsIStreamingProtocolController> mediacontroller;
-  nsCOMPtr<nsIURI> uri;
-  nsAutoCString scheme;
-
-  NS_ENSURE_ARG_POINTER(aChannel);
-  aChannel->GetURI(getter_AddRefs(uri));
-
-  nsresult rv = uri->GetScheme(scheme);
-  if (NS_FAILED(rv)) return rv;
-
-#ifdef NECKO_PROTOCOL_rtsp
-  if (scheme.EqualsLiteral("rtsp")) {
-    if (IsNeckoChild()) {
-      mediacontroller = new RtspControllerChild(aChannel);
-    } else {
-      mediacontroller = new RtspController(aChannel);
-    }
-  }
-#endif
-
-  if (!mediacontroller) {
-    return NS_ERROR_NO_INTERFACE;
-  }
-
-  mediacontroller->Init(uri);
-
-  mediacontroller.forget(aResult);
-  return NS_OK;
-}
-
-} // namespace net
-} // namespace mozilla
deleted file mode 100644
--- a/netwerk/base/StreamingProtocolService.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * 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/. */
-
-#ifndef mozilla_net_StreamingProtocolControllerService_h
-#define mozilla_net_StreamingProtocolControllerService_h
-
-#include "mozilla/StaticPtr.h"
-#include "nsIStreamingProtocolService.h"
-#include "nsIStreamingProtocolController.h"
-#include "nsCOMPtr.h"
-#include "nsIChannel.h"
-
-namespace mozilla {
-namespace net {
-
-/**
- * This class implements a service to help to create streaming protocol controller.
- */
-class StreamingProtocolControllerService : public nsIStreamingProtocolControllerService
-{
-private:
-  virtual ~StreamingProtocolControllerService() {};
-
-public:
-  NS_DECL_ISUPPORTS
-  NS_DECL_NSISTREAMINGPROTOCOLCONTROLLERSERVICE
-
-  StreamingProtocolControllerService() {};
-  static already_AddRefed<StreamingProtocolControllerService> GetInstance();
-};
-
-} // namespace net
-} // namespace mozilla
-
-#endif //mozilla_net_StreamingProtocolControllerService_h
--- a/netwerk/base/moz.build
+++ b/netwerk/base/moz.build
@@ -102,18 +102,16 @@ XPIDL_SOURCES += [
     'nsISerializationHelper.idl',
     'nsIServerSocket.idl',
     'nsISimpleStreamListener.idl',
     'nsISocketFilter.idl',
     'nsISocketTransport.idl',
     'nsISocketTransportService.idl',
     'nsISpeculativeConnect.idl',
     'nsIStandardURL.idl',
-    'nsIStreamingProtocolController.idl',
-    'nsIStreamingProtocolService.idl',
     'nsIStreamListener.idl',
     'nsIStreamListenerTee.idl',
     'nsIStreamLoader.idl',
     'nsIStreamTransportService.idl',
     'nsISyncStreamListener.idl',
     'nsISystemProxySettings.idl',
     'nsIThreadRetargetableRequest.idl',
     'nsIThreadRetargetableStreamListener.idl',
@@ -246,17 +244,16 @@ UNIFIED_SOURCES += [
     'PollableEvent.cpp',
     'Predictor.cpp',
     'ProxyAutoConfig.cpp',
     'RedirectChannelRegistrar.cpp',
     'RequestContextService.cpp',
     'SimpleBuffer.cpp',
     'SimpleChannel.cpp',
     'SimpleChannelParent.cpp',
-    'StreamingProtocolService.cpp',
     'TCPFastOpenLayer.cpp',
     'ThrottleQueue.cpp',
     'Tickler.cpp',
     'TLSServerSocket.cpp',
 ]
 
 if CONFIG['MOZ_RUST_URLPARSE']:
     EXPORTS.mozilla.net += [ 'RustURL.h' ]
@@ -304,16 +301,10 @@ FINAL_LIBRARY = 'xul'
 LOCAL_INCLUDES += [
     '/docshell/base',
     '/dom/base',
     '/netwerk/protocol/http',
     '/netwerk/socket',
     '/security/pkix/include'
 ]
 
-if 'rtsp' in CONFIG['NECKO_PROTOCOLS']:
-    LOCAL_INCLUDES += [
-        '/netwerk/protocol/rtsp/controller',
-        '/netwerk/protocol/rtsp/rtsp',
-    ]
-
 if CONFIG['GNU_CXX']:
     CXXFLAGS += ['-Wno-error=shadow']
deleted file mode 100644
--- a/netwerk/base/nsIStreamingProtocolController.idl
+++ /dev/null
@@ -1,186 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* vim: set sw=4 ts=4 et tw=80 : */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * 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/. */
-interface nsIURI;
-
-#include "nsISupports.idl"
-
-%{C++
-#define MEDIASTREAM_FRAMETYPE_NORMAL          0x00000001
-#define MEDIASTREAM_FRAMETYPE_DISCONTINUITY   0x00000002
-#define MEDIASTREAM_FRAMETYPE_END_OF_STREAM   0x00000004
-%}
-
-/**
- * Metadata of the media stream.
- */
-[uuid(294adb30-856c-11e2-9e96-0800200c9a66)]
-interface nsIStreamingProtocolMetaData : nsISupports
-{
-    /**
-     * Frame type.
-     */
-    attribute uint32_t frameType;
-
-    /**
-     * The total tracks for the given media stream session.
-     */
-    attribute uint32_t totalTracks;
-
-    /**
-     * The mime type of the track.
-     */
-    attribute ACString mimeType;
-
-    /**
-     * The width of the resolution.
-     */
-    attribute unsigned long width;
-
-    /**
-     * The height of the resolution.
-     */
-    attribute unsigned long height;
-
-    /**
-     * The duration of the media stream in units of microseconds.
-     */
-    attribute unsigned long long duration;
-
-    /**
-     * The sample rate of the media stream.
-     */
-    attribute unsigned long sampleRate;
-
-    /**
-     * The timestamp indicates the stream absolute position
-     * relative to the beginning of the presentation.
-     */
-    attribute unsigned long long timeStamp;
-
-    /**
-     * The total number of audio channels in the media stream.
-     */
-    attribute unsigned long channelCount;
-
-    /**
-     * The AAC audio codec specific data.
-     */
-    attribute ACString esdsData;
-
-    /**
-     * The AVCC format extradata of H.264 stream.
-     */
-    attribute ACString avccData;
-};
-
-/**
- * nsIStreamingProtocolListener
- */
-[scriptable, uuid(c4f6b660-892e-11e2-9e96-0800200c9a66)]
-interface nsIStreamingProtocolListener : nsISupports
-{
-    /**
-     * Called when the data may be read without blocking the calling thread.
-     * @param index The track number of the media stream.
-     * @param data Raw data of the media stream on given track number.
-     * @param length The length of the raw data.
-     * @param offset The offset in the data stream from the start of the media
-     *               presentation in bytes.
-     * @param meta The meta data of the frame.
-     */
-    void onMediaDataAvailable(in uint8_t index,
-                              in ACString data,
-                              in uint32_t length,
-                              in uint32_t offset,
-                              in nsIStreamingProtocolMetaData meta);
-
-    /**
-     * Called when the meta data for a given session is available.
-     * @param index The track number of the media stream.
-     * @param meta The meta data of the media stream.
-     */
-    void onConnected(in uint8_t index, in nsIStreamingProtocolMetaData meta);
-
-    /**
-     * Called when the Rtsp session is closed.
-     * @param index Track number of the media stream.
-     * @param reason The reason of disconnection.
-     */
-    void onDisconnected(in uint8_t index, in nsresult reason);
-};
-
-/**
- * Media stream controller API: control and retrieve meta data from media stream.
- */
-[uuid(4ce040f0-c50d-461f-94e2-af5a77fe13a5)]
-interface nsIStreamingProtocolController : nsISupports
-{
-    /**
-     * Preprare the URI before we can start the connection.
-     * @param aUri The URI of the media stream.
-     */
-    void init(in nsIURI aUri);
-
-    /**
-     * Asynchronously open this controller.  Data is fed to the specified
-     * media stream listener as it becomes available. If asyncOpen returns
-     * successfully, the controller is responsible for keeping itself alive
-     * until it has called onStopRequest on aListener.
-     *
-     * @param aListener The nsIStreamingProtocolListener implementation
-     */
-    void asyncOpen(in nsIStreamingProtocolListener aListener);
-
-    /*
-     * Get the metadata of a track.
-     * @param index Index of a track.
-     * @return A nsIStreamingProtocolMetaData.
-     */
-    nsIStreamingProtocolMetaData getTrackMetaData(in octet index);
-
-    /*
-     * Tell the streaming server to start sending media data.
-     */
-    void play();
-
-    /*
-     * Tell the streaming server to pause sending media data.
-     */
-    void pause();
-
-    /*
-     * Tell the streaming server to resume the suspended media stream.
-     */
-    void resume();
-
-    /*
-     * Tell the streaming server to suspend the media stream.
-     */
-    void suspend();
-
-    /*
-     * Tell the streaming server to send media data in specific time.
-     * @param seekTimeUs Start time of the media stream in microseconds.
-     */
-    void seek(in unsigned long long seekTimeUs);
-
-    /*
-     * Tell the streaming server to stop the
-     * media stream and close the connection.
-     */
-    void stop();
-
-    /*
-     * Notify the streaming controller that the playback has ended.
-     * The controller might have to perform certain internal state transition.
-     */
-    void playbackEnded();
-
-    /**
-     * Total number of audio/video tracks.
-     */
-    readonly attribute octet totalTracks;
-};
deleted file mode 100644
--- a/netwerk/base/nsIStreamingProtocolService.idl
+++ /dev/null
@@ -1,35 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* vim: set sw=4 ts=4 et tw=80 : */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * 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/. */
-
-interface nsIStreamingProtocolController;
-interface nsIChannel;
-
-#include "nsISupports.idl"
-
-%{C++
-#define NS_MEDIASTREAMCONTROLLERSERVICE_CID                                   \
-  { 0x94838530, 0x8627, 0x11e2,                                               \
-    {                                                                         \
-      0x9e, 0x96, 0x08, 0x00,                                                 \
-      0x20, 0x0c, 0x9a, 0x66                                                  \
-    }                                                                         \
-  }
-#define MEDIASTREAMCONTROLLERSERVICE_CONTRACTID                               \
-  "@mozilla.org/mediastream/mediastreamcontrollerservice;1"
-%}
-
-/**
- * Media stream controller Service API.
- */
-[uuid(94838530-8627-11e2-9e96-0800200c9a66)]
-interface nsIStreamingProtocolControllerService : nsISupports
-{
-    /*
-     * Create a new media stream controller from the given channel.
-     * @param channel nsIChannel for the given URI.
-     */
-    nsIStreamingProtocolController create(in nsIChannel channel);
-};
--- a/netwerk/build/moz.build
+++ b/netwerk/build/moz.build
@@ -17,25 +17,34 @@ include('/ipc/chromium/chromium-config.m
 FINAL_LIBRARY = 'xul'
 
 LOCAL_INCLUDES += [
     '/netwerk/base',
     '/netwerk/cache',
     '/netwerk/dns',
     '/netwerk/mime',
     '/netwerk/protocol/about',
+    '/netwerk/protocol/data',
+    '/netwerk/protocol/device',
+    '/netwerk/protocol/file',
+    '/netwerk/protocol/ftp',
+    '/netwerk/protocol/http',
+    '/netwerk/protocol/res',
+    '/netwerk/protocol/viewsource',
+    '/netwerk/protocol/websocket',
+    '/netwerk/protocol/wyciwyg',
     '/netwerk/socket',
     '/netwerk/streamconv',
     '/netwerk/streamconv/converters',
 ]
 
-protocols = CONFIG['NECKO_PROTOCOLS']
-LOCAL_INCLUDES += sorted([
-    '/netwerk/protocol/%s' % d for d in protocols if d != 'about'
-])
+if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']:
+    LOCAL_INCLUDES += [
+        '/netwerk/protocol/gio',
+    ]
 
 if CONFIG['OS_ARCH'] == 'WINNT':
     LOCAL_INCLUDES += [
         '/netwerk/system/win32',
     ]
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
     LOCAL_INCLUDES += [
@@ -57,17 +66,12 @@ if CONFIG['NECKO_COOKIES']:
         '/netwerk/cookie',
     ]
 
 if CONFIG['NECKO_WIFI']:
     LOCAL_INCLUDES += [
         '/netwerk/wifi',
     ]
 
-if CONFIG['MOZ_RTSP']:
-    LOCAL_INCLUDES += [
-        '/netwerk/protocol/rtsp',
-    ]
-
 LOCAL_INCLUDES += [
     '!/netwerk/dns',
     '/modules/brotli/dec',
 ]
--- a/netwerk/build/nsNetCID.h
+++ b/netwerk/build/nsNetCID.h
@@ -764,28 +764,16 @@
 { /* {dc01dbbb-a5bb-4cbb-82bb-085cce06c0bb} */       \
   0xdc01dbbb,                                        \
   0xa5bb,                                            \
   0x4cbb,                                            \
   {0x82, 0xbb, 0x08, 0x5c, 0xce, 0x06, 0xc0, 0xbb}   \
 }
 
 /******************************************************************************
- * netwerk/protocol/rtsp / classes
- */
-
-#define NS_RTSPPROTOCOLHANDLER_CID                   \
-{ /* {5bb4b980-7b10-11e2-b92a-0800200c9a66} */       \
-  0x5bb4b980,                                        \
-  0x7b10,                                            \
-  0x11e2,                                            \
-  {0xb9, 0x2a, 0x08, 0x00, 0x20, 0x0c, 0x9a, 0x66}   \
-}
-
-/******************************************************************************
  * netwerk/protocol/about/ classes
  */
 
 #define NS_ABOUTPROTOCOLHANDLER_CID                  \
 { /* 9e3b6c90-2f75-11d3-8cd0-0060b0fc14a3 */         \
     0x9e3b6c90,                                      \
     0x2f75,                                          \
     0x11d3,                                          \
--- a/netwerk/build/nsNetModule.cpp
+++ b/netwerk/build/nsNetModule.cpp
@@ -226,40 +226,33 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsWifiMon
 #include "nsAboutBlank.h"
 typedef mozilla::net::nsAboutProtocolHandler nsAboutProtocolHandler;
 typedef mozilla::net::nsSafeAboutProtocolHandler nsSafeAboutProtocolHandler;
 typedef mozilla::net::nsNestedAboutURI nsNestedAboutURI;
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsAboutProtocolHandler)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsSafeAboutProtocolHandler)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsNestedAboutURI)
 
-#ifdef NECKO_PROTOCOL_about
 // about
 #include "nsAboutCache.h"
 #include "nsAboutCacheEntry.h"
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsAboutCacheEntry)
-#endif
 
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsApplicationCacheService)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsApplicationCacheNamespace)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsApplicationCache)
 
-#ifdef NECKO_PROTOCOL_file
 // file
 #include "nsFileProtocolHandler.h"
 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsFileProtocolHandler, Init)
-#endif
 
-#ifdef NECKO_PROTOCOL_ftp
 // ftp
 #include "nsFtpProtocolHandler.h"
 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsFtpProtocolHandler, Init)
-#endif
 
-#ifdef NECKO_PROTOCOL_http
 // http/https
 #include "nsHttpHandler.h"
 #include "Http2Compression.h"
 #undef LOG
 #undef LOG_ENABLED
 #include "nsHttpAuthManager.h"
 #include "nsHttpChannelAuthProvider.h"
 #include "nsHttpBasicAuth.h"
@@ -279,17 +272,16 @@ NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsHt
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsHttpChannelAuthProvider)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsHttpActivityDistributor)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsHttpBasicAuth)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsHttpDigestAuth)
 NS_GENERIC_FACTORY_CONSTRUCTOR(ThrottleQueue)
 NS_GENERIC_FACTORY_CONSTRUCTOR(BackgroundChannelRegistrar)
 } // namespace net
 } // namespace mozilla
-#endif // !NECKO_PROTOCOL_http
 
 #include "mozilla/net/Dashboard.h"
 namespace mozilla {
 namespace net {
   NS_GENERIC_FACTORY_CONSTRUCTOR(Dashboard)
 } // namespace net
 } // namespace mozilla
 
@@ -297,52 +289,41 @@ namespace net {
 #include "../socket/nsNamedPipeService.h"
 namespace mozilla {
 namespace net {
 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(NamedPipeService, Init)
 } // namespace net
 } // namespace mozilla
 #endif
 
-#ifdef NECKO_PROTOCOL_res
 // resource
 #include "nsResProtocolHandler.h"
 #include "ExtensionProtocolHandler.h"
 #include "SubstitutingProtocolHandler.h"
 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsResProtocolHandler, Init)
 
 namespace mozilla {
 NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(ExtensionProtocolHandler,
     ExtensionProtocolHandler::GetSingleton)
 NS_GENERIC_FACTORY_CONSTRUCTOR(SubstitutingURL)
 } // namespace mozilla
-#endif
 
-#ifdef NECKO_PROTOCOL_device
 #include "nsDeviceProtocolHandler.h"
 typedef mozilla::net::nsDeviceProtocolHandler nsDeviceProtocolHandler;
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsDeviceProtocolHandler)
-#endif
 
-#ifdef NECKO_PROTOCOL_viewsource
 #include "nsViewSourceHandler.h"
 typedef mozilla::net::nsViewSourceHandler nsViewSourceHandler;
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsViewSourceHandler)
-#endif
 
-#ifdef NECKO_PROTOCOL_data
 #include "nsDataHandler.h"
-#endif
 
-#ifdef NECKO_PROTOCOL_wyciwyg
 #include "nsWyciwygProtocolHandler.h"
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsWyciwygProtocolHandler)
-#endif
 
-#ifdef NECKO_PROTOCOL_websocket
 #include "WebSocketChannel.h"
 #include "WebSocketChannelChild.h"
 namespace mozilla {
 namespace net {
 static BaseWebSocketChannel*
 WebSocketChannelConstructor(bool aSecure)
 {
   if (IsNeckoChild()) {
@@ -376,26 +357,16 @@ type##Constructor(nsISupports *aOuter, R
   return rv;                                          \
 }
 
 WEB_SOCKET_HANDLER_CONSTRUCTOR(WebSocketChannel, false)
 WEB_SOCKET_HANDLER_CONSTRUCTOR(WebSocketSSLChannel, true)
 #undef WEB_SOCKET_HANDLER_CONSTRUCTOR
 } // namespace net
 } // namespace mozilla
-#endif
-
-#ifdef NECKO_PROTOCOL_rtsp
-#include "RtspHandler.h"
-namespace mozilla {
-namespace net {
-NS_GENERIC_FACTORY_CONSTRUCTOR(RtspHandler)
-} // namespace mozilla::net
-} // namespace mozilla
-#endif
 
 ///////////////////////////////////////////////////////////////////////////////
 
 #include "nsURLParsers.h"
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsNoAuthURLParser)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsAuthURLParser)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsStdURLParser)
 
@@ -431,20 +402,18 @@ NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsNe
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsAndroidNetworkLinkService)
 #elif defined(XP_LINUX)
 #include "nsNotifyAddrListener_Linux.h"
 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsNotifyAddrListener, Init)
 #endif
 
 ///////////////////////////////////////////////////////////////////////////////
 
-#ifdef NECKO_PROTOCOL_ftp
 #include "nsFTPDirListingConv.h"
 nsresult NS_NewFTPDirListingConv(nsFTPDirListingConv** result);
-#endif
 
 #include "nsStreamConverterService.h"
 #include "nsMultiMixedConv.h"
 #include "nsHTTPCompressConv.h"
 #include "mozTXTToHTMLConv.h"
 #include "nsUnknownDecoder.h"
 
 #include "nsTXTToHTMLConv.h"
@@ -536,17 +505,16 @@ CreateNewStreamConvServiceFactory(nsISup
     rv = inst->QueryInterface(aIID, aResult);
     if (NS_FAILED(rv)) {
         *aResult = nullptr;
     }
     NS_RELEASE(inst);             /* get rid of extra refcnt */
     return rv;
 }
 
-#ifdef NECKO_PROTOCOL_ftp
 static nsresult
 CreateNewFTPDirListingConv(nsISupports* aOuter, REFNSIID aIID, void **aResult)
 {
     if (!aResult) {
         return NS_ERROR_INVALID_POINTER;
     }
     if (aOuter) {
         *aResult = nullptr;
@@ -560,17 +528,16 @@ CreateNewFTPDirListingConv(nsISupports* 
     }
     rv = inst->QueryInterface(aIID, aResult);
     if (NS_FAILED(rv)) {
         *aResult = nullptr;
     }
     NS_RELEASE(inst);             /* get rid of extra refcnt */
     return rv;
 }
-#endif
 
 static nsresult
 CreateNewMultiMixedConvFactory(nsISupports* aOuter, REFNSIID aIID, void **aResult)
 {
     if (!aResult) {
         return NS_ERROR_INVALID_POINTER;
     }
     if (aOuter) {
@@ -710,24 +677,20 @@ static void nsNetShutdown()
     net_ShutdownURLHelper();
 #ifdef XP_MACOSX
     net_ShutdownURLHelperOSX();
 #endif
 
     // Release DNS service reference.
     nsDNSPrefetch::Shutdown();
 
-#ifdef NECKO_PROTOCOL_websocket
     // Release the Websocket Admission Manager
     mozilla::net::WebSocketChannel::Shutdown();
-#endif // NECKO_PROTOCOL_websocket
 
-#ifdef NECKO_PROTOCOL_http
     mozilla::net::Http2CompressionCleanup();
-#endif // NECKO_PROTOCOL_http
 
     delete gNetSniffers;
     gNetSniffers = nullptr;
     delete gDataSniffers;
     gDataSniffers = nullptr;
 }
 
 NS_DEFINE_NAMED_CID(NS_IOSERVICE_CID);
@@ -774,96 +737,71 @@ NS_DEFINE_NAMED_CID(NS_BUFFEREDINPUTSTRE
 NS_DEFINE_NAMED_CID(NS_BUFFEREDOUTPUTSTREAM_CID);
 NS_DEFINE_NAMED_CID(NS_MIMEINPUTSTREAM_CID);
 NS_DEFINE_NAMED_CID(NS_PROTOCOLPROXYSERVICE_CID);
 NS_DEFINE_NAMED_CID(NS_STREAMCONVERTERSERVICE_CID);
 #if defined(XP_WIN)
 NS_DEFINE_NAMED_CID(NS_NAMEDPIPESERVICE_CID);
 #endif
 NS_DEFINE_NAMED_CID(NS_DASHBOARD_CID);
-#ifdef NECKO_PROTOCOL_ftp
 NS_DEFINE_NAMED_CID(NS_FTPDIRLISTINGCONVERTER_CID);
-#endif
 NS_DEFINE_NAMED_CID(NS_NSINDEXEDTOHTMLCONVERTER_CID);
 NS_DEFINE_NAMED_CID(NS_DIRINDEXPARSER_CID);
 NS_DEFINE_NAMED_CID(NS_MULTIMIXEDCONVERTER_CID);
 NS_DEFINE_NAMED_CID(NS_UNKNOWNDECODER_CID);
 NS_DEFINE_NAMED_CID(NS_BINARYDETECTOR_CID);
 NS_DEFINE_NAMED_CID(NS_HTTPCOMPRESSCONVERTER_CID);
 NS_DEFINE_NAMED_CID(NS_NSTXTTOHTMLCONVERTER_CID);
 #ifdef BUILD_BINHEX_DECODER
 NS_DEFINE_NAMED_CID(NS_BINHEXDECODER_CID);
 #endif
 NS_DEFINE_NAMED_CID(MOZITXTTOHTMLCONV_CID);
 NS_DEFINE_NAMED_CID(NS_DIRINDEX_CID);
 NS_DEFINE_NAMED_CID(NS_MIMEHEADERPARAM_CID);
-#ifdef NECKO_PROTOCOL_file
 NS_DEFINE_NAMED_CID(NS_FILEPROTOCOLHANDLER_CID);
-#endif
-#ifdef NECKO_PROTOCOL_http
 NS_DEFINE_NAMED_CID(NS_HTTPPROTOCOLHANDLER_CID);
 NS_DEFINE_NAMED_CID(NS_HTTPSPROTOCOLHANDLER_CID);
 NS_DEFINE_NAMED_CID(NS_HTTPBASICAUTH_CID);
 NS_DEFINE_NAMED_CID(NS_HTTPDIGESTAUTH_CID);
 NS_DEFINE_NAMED_CID(NS_HTTPNTLMAUTH_CID);
 NS_DEFINE_NAMED_CID(NS_HTTPAUTHMANAGER_CID);
 NS_DEFINE_NAMED_CID(NS_HTTPCHANNELAUTHPROVIDER_CID);
 NS_DEFINE_NAMED_CID(NS_HTTPACTIVITYDISTRIBUTOR_CID);
 NS_DEFINE_NAMED_CID(NS_THROTTLEQUEUE_CID);
 NS_DEFINE_NAMED_CID(NS_BACKGROUNDCHANNELREGISTRAR_CID);
-#endif // !NECKO_PROTOCOL_http
-#ifdef NECKO_PROTOCOL_ftp
 NS_DEFINE_NAMED_CID(NS_FTPPROTOCOLHANDLER_CID);
-#endif
-#ifdef NECKO_PROTOCOL_res
 NS_DEFINE_NAMED_CID(NS_RESPROTOCOLHANDLER_CID);
 NS_DEFINE_NAMED_CID(NS_EXTENSIONPROTOCOLHANDLER_CID);
 NS_DEFINE_NAMED_CID(NS_SUBSTITUTINGURL_CID);
-#endif
 NS_DEFINE_NAMED_CID(NS_ABOUTPROTOCOLHANDLER_CID);
 NS_DEFINE_NAMED_CID(NS_SAFEABOUTPROTOCOLHANDLER_CID);
 NS_DEFINE_NAMED_CID(NS_ABOUT_BLANK_MODULE_CID);
 NS_DEFINE_NAMED_CID(NS_NESTEDABOUTURI_CID);
-#ifdef NECKO_PROTOCOL_about
 NS_DEFINE_NAMED_CID(NS_ABOUT_CACHE_MODULE_CID);
 NS_DEFINE_NAMED_CID(NS_ABOUT_CACHE_ENTRY_MODULE_CID);
-#endif
 NS_DEFINE_NAMED_CID(NS_SOCKSSOCKETPROVIDER_CID);
 NS_DEFINE_NAMED_CID(NS_SOCKS4SOCKETPROVIDER_CID);
 NS_DEFINE_NAMED_CID(NS_UDPSOCKETPROVIDER_CID);
 NS_DEFINE_NAMED_CID(NS_CACHESERVICE_CID);
 NS_DEFINE_NAMED_CID(NS_APPLICATIONCACHESERVICE_CID);
 NS_DEFINE_NAMED_CID(NS_APPLICATIONCACHENAMESPACE_CID);
 NS_DEFINE_NAMED_CID(NS_APPLICATIONCACHE_CID);
 #ifdef NECKO_COOKIES
 NS_DEFINE_NAMED_CID(NS_COOKIEMANAGER_CID);
 NS_DEFINE_NAMED_CID(NS_COOKIESERVICE_CID);
 #endif
 #ifdef NECKO_WIFI
 NS_DEFINE_NAMED_CID(NS_WIFI_MONITOR_COMPONENT_CID);
 #endif
-#ifdef NECKO_PROTOCOL_data
 NS_DEFINE_NAMED_CID(NS_DATAPROTOCOLHANDLER_CID);
-#endif
-#ifdef NECKO_PROTOCOL_device
 NS_DEFINE_NAMED_CID(NS_DEVICEPROTOCOLHANDLER_CID);
-#endif
-#ifdef NECKO_PROTOCOL_viewsource
 NS_DEFINE_NAMED_CID(NS_VIEWSOURCEHANDLER_CID);
-#endif
-#ifdef NECKO_PROTOCOL_wyciwyg
 NS_DEFINE_NAMED_CID(NS_WYCIWYGPROTOCOLHANDLER_CID);
-#endif
-#ifdef NECKO_PROTOCOL_websocket
 NS_DEFINE_NAMED_CID(NS_WEBSOCKETPROTOCOLHANDLER_CID);
 NS_DEFINE_NAMED_CID(NS_WEBSOCKETSSLPROTOCOLHANDLER_CID);
-#endif
-#ifdef NECKO_PROTOCOL_rtsp
-NS_DEFINE_NAMED_CID(NS_RTSPPROTOCOLHANDLER_CID);
-#endif
 #if defined(XP_WIN)
 NS_DEFINE_NAMED_CID(NS_NETWORK_LINK_SERVICE_CID);
 #elif defined(MOZ_WIDGET_COCOA)
 NS_DEFINE_NAMED_CID(NS_NETWORK_LINK_SERVICE_CID);
 #elif defined(MOZ_WIDGET_ANDROID)
 NS_DEFINE_NAMED_CID(NS_NETWORK_LINK_SERVICE_CID);
 #elif defined(XP_LINUX)
 NS_DEFINE_NAMED_CID(NS_NETWORK_LINK_SERVICE_CID);
@@ -926,98 +864,73 @@ static const mozilla::Module::CIDEntry k
     { &kNS_BUFFEREDOUTPUTSTREAM_CID, false, nullptr, nsBufferedOutputStream::Create },
     { &kNS_MIMEINPUTSTREAM_CID, false, nullptr, nsMIMEInputStreamConstructor },
     { &kNS_PROTOCOLPROXYSERVICE_CID, true, nullptr, nsProtocolProxyServiceConstructor },
     { &kNS_STREAMCONVERTERSERVICE_CID, false, nullptr, CreateNewStreamConvServiceFactory },
 #if defined (XP_WIN)
     { &kNS_NAMEDPIPESERVICE_CID, false, NULL, mozilla::net::NamedPipeServiceConstructor },
 #endif
     { &kNS_DASHBOARD_CID, false, nullptr, mozilla::net::DashboardConstructor },
-#ifdef NECKO_PROTOCOL_ftp
     { &kNS_FTPDIRLISTINGCONVERTER_CID, false, nullptr, CreateNewFTPDirListingConv },
-#endif
     { &kNS_NSINDEXEDTOHTMLCONVERTER_CID, false, nullptr, nsIndexedToHTML::Create },
     { &kNS_DIRINDEXPARSER_CID, false, nullptr, nsDirIndexParserConstructor },
     { &kNS_MULTIMIXEDCONVERTER_CID, false, nullptr, CreateNewMultiMixedConvFactory },
     { &kNS_UNKNOWNDECODER_CID, false, nullptr, CreateNewUnknownDecoderFactory },
     { &kNS_BINARYDETECTOR_CID, false, nullptr, CreateNewBinaryDetectorFactory },
     { &kNS_HTTPCOMPRESSCONVERTER_CID, false, nullptr, CreateNewHTTPCompressConvFactory },
     { &kNS_NSTXTTOHTMLCONVERTER_CID, false, nullptr, mozilla::net::nsTXTToHTMLConvConstructor },
 #ifdef BUILD_BINHEX_DECODER
     { &kNS_BINHEXDECODER_CID, false, nullptr, nsBinHexDecoderConstructor },
 #endif
     { &kMOZITXTTOHTMLCONV_CID, false, nullptr, CreateNewTXTToHTMLConvFactory },
     { &kNS_DIRINDEX_CID, false, nullptr, nsDirIndexConstructor },
     { &kNS_MIMEHEADERPARAM_CID, false, nullptr, nsMIMEHeaderParamImplConstructor },
-#ifdef NECKO_PROTOCOL_file
     { &kNS_FILEPROTOCOLHANDLER_CID, false, nullptr, nsFileProtocolHandlerConstructor },
-#endif
-#ifdef NECKO_PROTOCOL_http
     { &kNS_HTTPPROTOCOLHANDLER_CID, false, nullptr, mozilla::net::nsHttpHandlerConstructor },
     { &kNS_HTTPSPROTOCOLHANDLER_CID, false, nullptr, mozilla::net::nsHttpsHandlerConstructor },
     { &kNS_HTTPBASICAUTH_CID, false, nullptr, mozilla::net::nsHttpBasicAuthConstructor },
     { &kNS_HTTPDIGESTAUTH_CID, false, nullptr, mozilla::net::nsHttpDigestAuthConstructor },
     { &kNS_HTTPNTLMAUTH_CID, false, nullptr, mozilla::net::nsHttpNTLMAuthConstructor },
     { &kNS_HTTPAUTHMANAGER_CID, false, nullptr, mozilla::net::nsHttpAuthManagerConstructor },
     { &kNS_HTTPCHANNELAUTHPROVIDER_CID, false, nullptr, mozilla::net::nsHttpChannelAuthProviderConstructor },
     { &kNS_HTTPACTIVITYDISTRIBUTOR_CID, false, nullptr, mozilla::net::nsHttpActivityDistributorConstructor },
     { &kNS_THROTTLEQUEUE_CID, false, nullptr, mozilla::net::ThrottleQueueConstructor },
     { &kNS_BACKGROUNDCHANNELREGISTRAR_CID, false, nullptr, mozilla::net::BackgroundChannelRegistrarConstructor },
-#endif // !NECKO_PROTOCOL_http
-#ifdef NECKO_PROTOCOL_ftp
     { &kNS_FTPPROTOCOLHANDLER_CID, false, nullptr, nsFtpProtocolHandlerConstructor },
-#endif
-#ifdef NECKO_PROTOCOL_res
     { &kNS_RESPROTOCOLHANDLER_CID, false, nullptr, nsResProtocolHandlerConstructor },
     { &kNS_EXTENSIONPROTOCOLHANDLER_CID, false, nullptr, mozilla::ExtensionProtocolHandlerConstructor },
     { &kNS_SUBSTITUTINGURL_CID, false, nullptr, mozilla::SubstitutingURLConstructor },
-#endif
     { &kNS_ABOUTPROTOCOLHANDLER_CID, false, nullptr, nsAboutProtocolHandlerConstructor },
     { &kNS_SAFEABOUTPROTOCOLHANDLER_CID, false, nullptr, nsSafeAboutProtocolHandlerConstructor },
     { &kNS_ABOUT_BLANK_MODULE_CID, false, nullptr, nsAboutBlank::Create },
     { &kNS_NESTEDABOUTURI_CID, false, nullptr, nsNestedAboutURIConstructor },
-#ifdef NECKO_PROTOCOL_about
     { &kNS_ABOUT_CACHE_MODULE_CID, false, nullptr, nsAboutCache::Create },
     { &kNS_ABOUT_CACHE_ENTRY_MODULE_CID, false, nullptr, nsAboutCacheEntryConstructor },
-#endif
     { &kNS_SOCKSSOCKETPROVIDER_CID, false, nullptr, nsSOCKSSocketProvider::CreateV5 },
     { &kNS_SOCKS4SOCKETPROVIDER_CID, false, nullptr, nsSOCKSSocketProvider::CreateV4 },
     { &kNS_UDPSOCKETPROVIDER_CID, false, nullptr, nsUDPSocketProviderConstructor },
     { &kNS_CACHESERVICE_CID, false, nullptr, nsCacheService::Create },
     { &kNS_APPLICATIONCACHESERVICE_CID, false, nullptr, nsApplicationCacheServiceConstructor },
     { &kNS_APPLICATIONCACHENAMESPACE_CID, false, nullptr, nsApplicationCacheNamespaceConstructor },
     { &kNS_APPLICATIONCACHE_CID, false, nullptr, nsApplicationCacheConstructor },
 #ifdef NECKO_COOKIES
     { &kNS_COOKIEMANAGER_CID, false, nullptr, nsICookieServiceConstructor },
     { &kNS_COOKIESERVICE_CID, false, nullptr, nsICookieServiceConstructor },
 #endif
 #ifdef NECKO_WIFI
     { &kNS_WIFI_MONITOR_COMPONENT_CID, false, nullptr, nsWifiMonitorConstructor },
 #endif
-#ifdef NECKO_PROTOCOL_data
     { &kNS_DATAPROTOCOLHANDLER_CID, false, nullptr, nsDataHandler::Create },
-#endif
-#ifdef NECKO_PROTOCOL_device
     { &kNS_DEVICEPROTOCOLHANDLER_CID, false, nullptr, nsDeviceProtocolHandlerConstructor},
-#endif
-#ifdef NECKO_PROTOCOL_viewsource
     { &kNS_VIEWSOURCEHANDLER_CID, false, nullptr, nsViewSourceHandlerConstructor },
-#endif
-#ifdef NECKO_PROTOCOL_wyciwyg
     { &kNS_WYCIWYGPROTOCOLHANDLER_CID, false, nullptr, nsWyciwygProtocolHandlerConstructor },
-#endif
-#ifdef NECKO_PROTOCOL_websocket
     { &kNS_WEBSOCKETPROTOCOLHANDLER_CID, false, nullptr,
       mozilla::net::WebSocketChannelConstructor },
     { &kNS_WEBSOCKETSSLPROTOCOLHANDLER_CID, false, nullptr,
       mozilla::net::WebSocketSSLChannelConstructor },
-#endif
-#ifdef NECKO_PROTOCOL_rtsp
-    { &kNS_RTSPPROTOCOLHANDLER_CID, false, nullptr, mozilla::net::RtspHandlerConstructor },
-#endif
 #if defined(XP_WIN)
     { &kNS_NETWORK_LINK_SERVICE_CID, false, nullptr, nsNotifyAddrListenerConstructor },
 #elif defined(MOZ_WIDGET_COCOA)
     { &kNS_NETWORK_LINK_SERVICE_CID, false, nullptr, nsNetworkLinkServiceConstructor },
 #elif defined(MOZ_WIDGET_ANDROID)
     { &kNS_NETWORK_LINK_SERVICE_CID, false, nullptr, nsAndroidNetworkLinkServiceConstructor },
 #elif defined(XP_LINUX)
     { &kNS_NETWORK_LINK_SERVICE_CID, false, nullptr, nsNotifyAddrListenerConstructor },
@@ -1080,19 +993,17 @@ static const mozilla::Module::ContractID
     { NS_BUFFEREDOUTPUTSTREAM_CONTRACTID, &kNS_BUFFEREDOUTPUTSTREAM_CID },
     { NS_MIMEINPUTSTREAM_CONTRACTID, &kNS_MIMEINPUTSTREAM_CID },
     { NS_PROTOCOLPROXYSERVICE_CONTRACTID, &kNS_PROTOCOLPROXYSERVICE_CID },
     { NS_STREAMCONVERTERSERVICE_CONTRACTID, &kNS_STREAMCONVERTERSERVICE_CID },
 #if defined(XP_WIN)
     { NS_NAMEDPIPESERVICE_CONTRACTID, &kNS_NAMEDPIPESERVICE_CID },
 #endif
     { NS_DASHBOARD_CONTRACTID, &kNS_DASHBOARD_CID },
-#ifdef NECKO_PROTOCOL_ftp
     { NS_ISTREAMCONVERTER_KEY FTP_TO_INDEX, &kNS_FTPDIRLISTINGCONVERTER_CID },
-#endif
     { NS_ISTREAMCONVERTER_KEY INDEX_TO_HTML, &kNS_NSINDEXEDTOHTMLCONVERTER_CID },
     { NS_DIRINDEXPARSER_CONTRACTID, &kNS_DIRINDEXPARSER_CID },
     { NS_ISTREAMCONVERTER_KEY MULTI_MIXED_X, &kNS_MULTIMIXEDCONVERTER_CID },
     { NS_ISTREAMCONVERTER_KEY MULTI_BYTERANGES, &kNS_MULTIMIXEDCONVERTER_CID },
     { NS_ISTREAMCONVERTER_KEY MULTI_MIXED, &kNS_MULTIMIXEDCONVERTER_CID },
     { NS_ISTREAMCONVERTER_KEY UNKNOWN_CONTENT, &kNS_UNKNOWNDECODER_CID },
     { NS_GENERIC_CONTENT_SNIFFER, &kNS_UNKNOWNDECODER_CID },
     { NS_BINARYDETECTOR_CONTRACTID, &kNS_BINARYDETECTOR_CID },
@@ -1104,78 +1015,55 @@ static const mozilla::Module::ContractID
     { NS_ISTREAMCONVERTER_KEY DEFLATE_TO_UNCOMPRESSED, &kNS_HTTPCOMPRESSCONVERTER_CID },
     { NS_ISTREAMCONVERTER_KEY PLAIN_TO_HTML, &kNS_NSTXTTOHTMLCONVERTER_CID },
 #ifdef BUILD_BINHEX_DECODER
     { NS_ISTREAMCONVERTER_KEY BINHEX_TO_WILD, &kNS_BINHEXDECODER_CID },
 #endif
     { MOZ_TXTTOHTMLCONV_CONTRACTID, &kMOZITXTTOHTMLCONV_CID },
     { "@mozilla.org/dirIndex;1", &kNS_DIRINDEX_CID },
     { NS_MIMEHEADERPARAM_CONTRACTID, &kNS_MIMEHEADERPARAM_CID },
-#ifdef NECKO_PROTOCOL_file
     { NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "file", &kNS_FILEPROTOCOLHANDLER_CID },
-#endif
-#ifdef NECKO_PROTOCOL_http
     { NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "http", &kNS_HTTPPROTOCOLHANDLER_CID },
     { NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "https", &kNS_HTTPSPROTOCOLHANDLER_CID },
     { NS_HTTP_AUTHENTICATOR_CONTRACTID_PREFIX "basic", &kNS_HTTPBASICAUTH_CID },
     { NS_HTTP_AUTHENTICATOR_CONTRACTID_PREFIX "digest", &kNS_HTTPDIGESTAUTH_CID },
     { NS_HTTP_AUTHENTICATOR_CONTRACTID_PREFIX "ntlm", &kNS_HTTPNTLMAUTH_CID },
     { NS_HTTPAUTHMANAGER_CONTRACTID, &kNS_HTTPAUTHMANAGER_CID },
     { NS_HTTPCHANNELAUTHPROVIDER_CONTRACTID, &kNS_HTTPCHANNELAUTHPROVIDER_CID },
     { NS_HTTPACTIVITYDISTRIBUTOR_CONTRACTID, &kNS_HTTPACTIVITYDISTRIBUTOR_CID },
     { NS_THROTTLEQUEUE_CONTRACTID, &kNS_THROTTLEQUEUE_CID },
     { NS_BACKGROUNDCHANNELREGISTRAR_CONTRACTID, &kNS_BACKGROUNDCHANNELREGISTRAR_CID },
-#endif // !NECKO_PROTOCOL_http
-#ifdef NECKO_PROTOCOL_ftp
     { NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "ftp", &kNS_FTPPROTOCOLHANDLER_CID },
-#endif
-#ifdef NECKO_PROTOCOL_res
     { NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "resource", &kNS_RESPROTOCOLHANDLER_CID },
     { NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "moz-extension", &kNS_EXTENSIONPROTOCOLHANDLER_CID },
-#endif
     { NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "about", &kNS_ABOUTPROTOCOLHANDLER_CID },
     { NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "moz-safe-about", &kNS_SAFEABOUTPROTOCOLHANDLER_CID },
     { NS_ABOUT_MODULE_CONTRACTID_PREFIX "blank", &kNS_ABOUT_BLANK_MODULE_CID },
-#ifdef NECKO_PROTOCOL_about
     { NS_ABOUT_MODULE_CONTRACTID_PREFIX "cache", &kNS_ABOUT_CACHE_MODULE_CID },
     { NS_ABOUT_MODULE_CONTRACTID_PREFIX "cache-entry", &kNS_ABOUT_CACHE_ENTRY_MODULE_CID },
-#endif
     { NS_NETWORK_SOCKET_CONTRACTID_PREFIX "socks", &kNS_SOCKSSOCKETPROVIDER_CID },
     { NS_NETWORK_SOCKET_CONTRACTID_PREFIX "socks4", &kNS_SOCKS4SOCKETPROVIDER_CID },
     { NS_NETWORK_SOCKET_CONTRACTID_PREFIX "udp", &kNS_UDPSOCKETPROVIDER_CID },
     { NS_CACHESERVICE_CONTRACTID, &kNS_CACHESERVICE_CID },
     { NS_APPLICATIONCACHESERVICE_CONTRACTID, &kNS_APPLICATIONCACHESERVICE_CID },
     { NS_APPLICATIONCACHENAMESPACE_CONTRACTID, &kNS_APPLICATIONCACHENAMESPACE_CID },
     { NS_APPLICATIONCACHE_CONTRACTID, &kNS_APPLICATIONCACHE_CID },
 #ifdef NECKO_COOKIES
     { NS_COOKIEMANAGER_CONTRACTID, &kNS_COOKIEMANAGER_CID },
     { NS_COOKIESERVICE_CONTRACTID, &kNS_COOKIESERVICE_CID },
 #endif
 #ifdef NECKO_WIFI
     { NS_WIFI_MONITOR_CONTRACTID, &kNS_WIFI_MONITOR_COMPONENT_CID },
 #endif
-#ifdef NECKO_PROTOCOL_data
     { NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "data", &kNS_DATAPROTOCOLHANDLER_CID },
-#endif
-#ifdef NECKO_PROTOCOL_device
     { NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "moz-device", &kNS_DEVICEPROTOCOLHANDLER_CID },
-#endif
-#ifdef NECKO_PROTOCOL_viewsource
     { NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "view-source", &kNS_VIEWSOURCEHANDLER_CID },
-#endif
-#ifdef NECKO_PROTOCOL_wyciwyg
     { NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "wyciwyg", &kNS_WYCIWYGPROTOCOLHANDLER_CID },
-#endif
-#ifdef NECKO_PROTOCOL_websocket
     { NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "ws", &kNS_WEBSOCKETPROTOCOLHANDLER_CID },
     { NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "wss", &kNS_WEBSOCKETSSLPROTOCOLHANDLER_CID },
-#endif
-#ifdef NECKO_PROTOCOL_rtsp
-    { NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "rtsp", &kNS_RTSPPROTOCOLHANDLER_CID },
-#endif
 #if defined(XP_WIN)
     { NS_NETWORK_LINK_SERVICE_CONTRACTID, &kNS_NETWORK_LINK_SERVICE_CID },
 #elif defined(MOZ_WIDGET_COCOA)
     { NS_NETWORK_LINK_SERVICE_CONTRACTID, &kNS_NETWORK_LINK_SERVICE_CID },
 #elif defined(MOZ_WIDGET_ANDROID)
     { NS_NETWORK_LINK_SERVICE_CONTRACTID, &kNS_NETWORK_LINK_SERVICE_CID },
 #elif defined(XP_LINUX)
     { NS_NETWORK_LINK_SERVICE_CONTRACTID, &kNS_NETWORK_LINK_SERVICE_CID },
--- a/netwerk/ipc/NeckoChannelParams.ipdlh
+++ b/netwerk/ipc/NeckoChannelParams.ipdlh
@@ -2,17 +2,16 @@
 /* vim: set sw=2 ts=8 et tw=80 ft=c: */
 
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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/. */
 
 include protocol PHttpChannel;
 include protocol PFTPChannel;
-include protocol PRtspChannel;
 include protocol PChildToParentStream;
 include BlobTypes;
 include URIParams;
 include IPCStream;
 include PBackgroundSharedTypes;
 
 using mozilla::OriginAttributes from "mozilla/ipc/BackgroundUtils.h";
 using struct mozilla::void_t from "ipc/IPCMessageUtils.h";
@@ -207,20 +206,10 @@ struct CookieStruct
   nsCString path;
   int64_t   expiry;
   int64_t   lastAccessed;
   int64_t   creationTime;
   bool      isSession;
   bool      isSecure;
 };
 
-//-----------------------------------------------------------------------------
-// RTSP IPDL structs
-//-----------------------------------------------------------------------------
-
-struct RtspChannelConnectArgs
-{
-  URIParams uri;
-  uint32_t channelId;
-};
-
 } // namespace ipc
 } // namespace mozilla
--- a/netwerk/ipc/NeckoChild.cpp
+++ b/netwerk/ipc/NeckoChild.cpp
@@ -22,20 +22,16 @@
 #include "mozilla/dom/network/TCPSocketChild.h"
 #include "mozilla/dom/network/TCPServerSocketChild.h"
 #include "mozilla/dom/network/UDPSocketChild.h"
 #include "mozilla/net/AltDataOutputStreamChild.h"
 #ifdef MOZ_WEBRTC
 #include "mozilla/net/StunAddrsRequestChild.h"
 #endif
 
-#ifdef NECKO_PROTOCOL_rtsp
-#include "mozilla/net/RtspControllerChild.h"
-#include "mozilla/net/RtspChannelChild.h"
-#endif
 #include "SerializedLoadContext.h"
 #include "nsGlobalWindow.h"
 #include "nsIOService.h"
 #include "nsINetworkPredictor.h"
 #include "nsINetworkPredictorVerifier.h"
 #include "mozilla/ipc/URIUtils.h"
 #include "nsNetUtil.h"
 
@@ -270,50 +266,16 @@ NeckoChild::AllocPSimpleChannelChild(con
 
 bool
 NeckoChild::DeallocPSimpleChannelChild(PSimpleChannelChild* child)
 {
   // NB: See SimpleChannelChild::ActorDestroy.
   return true;
 }
 
-PRtspControllerChild*
-NeckoChild::AllocPRtspControllerChild()
-{
-  NS_NOTREACHED("AllocPRtspController should not be called");
-  return nullptr;
-}
-
-bool
-NeckoChild::DeallocPRtspControllerChild(PRtspControllerChild* child)
-{
-#ifdef NECKO_PROTOCOL_rtsp
-  RtspControllerChild* p = static_cast<RtspControllerChild*>(child);
-  p->ReleaseIPDLReference();
-#endif
-  return true;
-}
-
-PRtspChannelChild*
-NeckoChild::AllocPRtspChannelChild(const RtspChannelConnectArgs& aArgs)
-{
-  NS_NOTREACHED("AllocPRtspController should not be called");
-  return nullptr;
-}
-
-bool
-NeckoChild::DeallocPRtspChannelChild(PRtspChannelChild* child)
-{
-#ifdef NECKO_PROTOCOL_rtsp
-  RtspChannelChild* p = static_cast<RtspChannelChild*>(child);
-  p->ReleaseIPDLReference();
-#endif
-  return true;
-}
-
 PTCPSocketChild*
 NeckoChild::AllocPTCPSocketChild(const nsString& host,
                                  const uint16_t& port)
 {
   TCPSocketChild* p = new TCPSocketChild(host, port, nullptr);
   p->AddIPDLReference();
   return p;
 }
--- a/netwerk/ipc/NeckoChild.h
+++ b/netwerk/ipc/NeckoChild.h
@@ -68,22 +68,16 @@ protected:
                                                   const nsCString& aNetworkInterface) override;
   virtual bool DeallocPDNSRequestChild(PDNSRequestChild*) override;
   virtual PDataChannelChild* AllocPDataChannelChild(const uint32_t& channelId) override;
   virtual bool DeallocPDataChannelChild(PDataChannelChild* child) override;
   virtual PFileChannelChild* AllocPFileChannelChild(const uint32_t& channelId) override;
   virtual bool DeallocPFileChannelChild(PFileChannelChild* child) override;
   virtual PSimpleChannelChild* AllocPSimpleChannelChild(const uint32_t& channelId) override;
   virtual bool DeallocPSimpleChannelChild(PSimpleChannelChild* child) override;
-  virtual PRtspControllerChild* AllocPRtspControllerChild() override;
-  virtual bool DeallocPRtspControllerChild(PRtspControllerChild*) override;
-  virtual PRtspChannelChild*
-    AllocPRtspChannelChild(const RtspChannelConnectArgs& aArgs)
-                           override;
-  virtual bool DeallocPRtspChannelChild(PRtspChannelChild*) override;
   virtual PChannelDiverterChild*
   AllocPChannelDiverterChild(const ChannelDiverterArgs& channel) override;
   virtual bool
   DeallocPChannelDiverterChild(PChannelDiverterChild* actor) override;
   virtual PTransportProviderChild*
   AllocPTransportProviderChild() override;
   virtual bool
   DeallocPTransportProviderChild(PTransportProviderChild* aActor) override;
--- a/netwerk/ipc/NeckoParent.cpp
+++ b/netwerk/ipc/NeckoParent.cpp
@@ -17,20 +17,16 @@
 #include "mozilla/net/FTPChannelParent.h"
 #include "mozilla/net/WebSocketChannelParent.h"
 #include "mozilla/net/WebSocketEventListenerParent.h"
 #include "mozilla/net/DataChannelParent.h"
 #include "mozilla/net/SimpleChannelParent.h"
 #include "mozilla/net/AltDataOutputStreamParent.h"
 #include "mozilla/Unused.h"
 #include "mozilla/net/FileChannelParent.h"
-#ifdef NECKO_PROTOCOL_rtsp
-#include "mozilla/net/RtspControllerParent.h"
-#include "mozilla/net/RtspChannelParent.h"
-#endif
 #include "mozilla/net/DNSRequestParent.h"
 #include "mozilla/net/ChannelDiverterParent.h"
 #include "mozilla/net/IPCTransportProvider.h"
 #ifdef MOZ_WEBRTC
 #include "mozilla/net/StunAddrsRequestParent.h"
 #endif
 #include "mozilla/dom/ChromeUtils.h"
 #include "mozilla/dom/ContentParent.h"
@@ -573,74 +569,16 @@ NeckoParent::RecvPFileChannelConstructor
                                          const uint32_t& channelId)
 {
   FileChannelParent* p = static_cast<FileChannelParent*>(actor);
   DebugOnly<bool> rv = p->Init(channelId);
   MOZ_ASSERT(rv);
   return IPC_OK();
 }
 
-PRtspControllerParent*
-NeckoParent::AllocPRtspControllerParent()
-{
-#ifdef NECKO_PROTOCOL_rtsp
-  RtspControllerParent* p = new RtspControllerParent();
-  p->AddRef();
-  return p;
-#else
-  return nullptr;
-#endif
-}
-
-bool
-NeckoParent::DeallocPRtspControllerParent(PRtspControllerParent* actor)
-{
-#ifdef NECKO_PROTOCOL_rtsp
-  RtspControllerParent* p = static_cast<RtspControllerParent*>(actor);
-  p->Release();
-#endif
-  return true;
-}
-
-PRtspChannelParent*
-NeckoParent::AllocPRtspChannelParent(const RtspChannelConnectArgs& aArgs)
-{
-#ifdef NECKO_PROTOCOL_rtsp
-  nsCOMPtr<nsIURI> uri = DeserializeURI(aArgs.uri());
-  RtspChannelParent *p = new RtspChannelParent(uri);
-  p->AddRef();
-  return p;
-#else
-  return nullptr;
-#endif
-}
-
-mozilla::ipc::IPCResult
-NeckoParent::RecvPRtspChannelConstructor(
-                      PRtspChannelParent* aActor,
-                      const RtspChannelConnectArgs& aConnectArgs)
-{
-#ifdef NECKO_PROTOCOL_rtsp
-  RtspChannelParent* p = static_cast<RtspChannelParent*>(aActor);
-  return p->Init(aConnectArgs);
-#else
-  return IPC_FAIL_NO_REASON(this);
-#endif
-}
-
-bool
-NeckoParent::DeallocPRtspChannelParent(PRtspChannelParent* actor)
-{
-#ifdef NECKO_PROTOCOL_rtsp
-  RtspChannelParent* p = static_cast<RtspChannelParent*>(actor);
-  p->Release();
-#endif
-  return true;
-}
-
 PTCPSocketParent*
 NeckoParent::AllocPTCPSocketParent(const nsString& /* host */,
                                    const uint16_t& /* port */)
 {
   // We actually don't need host/port to construct a TCPSocketParent since
   // TCPSocketParent will maintain an internal nsIDOMTCPSocket instance which
   // can be delegated to get the host/port.
   TCPSocketParent* p = new TCPSocketParent();
--- a/netwerk/ipc/NeckoParent.h
+++ b/netwerk/ipc/NeckoParent.h
@@ -191,28 +191,16 @@ protected:
 
   virtual PFileChannelParent*
     AllocPFileChannelParent(const uint32_t& channelId) override;
   virtual bool DeallocPFileChannelParent(PFileChannelParent* parent) override;
 
   virtual mozilla::ipc::IPCResult RecvPFileChannelConstructor(PFileChannelParent* aActor,
                                                               const uint32_t& channelId) override;
 
-  virtual PRtspControllerParent* AllocPRtspControllerParent() override;
-  virtual bool DeallocPRtspControllerParent(PRtspControllerParent*) override;
-
-  virtual PRtspChannelParent*
-    AllocPRtspChannelParent(const RtspChannelConnectArgs& aArgs)
-                            override;
-  virtual mozilla::ipc::IPCResult
-    RecvPRtspChannelConstructor(PRtspChannelParent* aActor,
-                                const RtspChannelConnectArgs& aArgs)
-                                override;
-  virtual bool DeallocPRtspChannelParent(PRtspChannelParent*) override;
-
   virtual PChannelDiverterParent*
   AllocPChannelDiverterParent(const ChannelDiverterArgs& channel) override;
   virtual mozilla::ipc::IPCResult
   RecvPChannelDiverterConstructor(PChannelDiverterParent* actor,
                                   const ChannelDiverterArgs& channel) override;
   virtual bool DeallocPChannelDiverterParent(PChannelDiverterParent* actor)
                                                                 override;
   virtual PTransportProviderParent*
--- a/netwerk/ipc/PNecko.ipdl
+++ b/netwerk/ipc/PNecko.ipdl
@@ -22,18 +22,16 @@ include protocol PFileDescriptorSet;
 include protocol PDataChannel;
 include protocol PSimpleChannel;
 include protocol PTransportProvider;
 include protocol PChildToParentStream; //FIXME: bug #792908
 include protocol PParentToChildStream; //FIXME: bug #792908
 include protocol PStunAddrsRequest;
 include protocol PFileChannel;
 
-include protocol PRtspController;
-include protocol PRtspChannel;
 include IPCStream;
 include URIParams;
 include NeckoChannelParams;
 include PBrowserOrId;
 include protocol PAltDataOutputStream;
 
 using class IPC::SerializedLoadContext from "SerializedLoadContext.h";
 using mozilla::dom::TabId from "mozilla/dom/ipc/IdType.h";
@@ -54,18 +52,16 @@ nested(upto inside_cpow) sync protocol P
   manages PWebSocketEventListener;
   manages PTCPSocket;
   manages PTCPServerSocket;
   manages PUDPSocket;
   manages PDNSRequest;
   manages PDataChannel;
   manages PSimpleChannel;
   manages PFileChannel;
-  manages PRtspController;
-  manages PRtspChannel;
   manages PChannelDiverter;
   manages PTransportProvider;
   manages PAltDataOutputStream;
   manages PStunAddrsRequest;
 
 parent:
   async __delete__();
 
@@ -104,18 +100,16 @@ parent:
   /**
    * channelId is used to establish a connection between redirect channels in
    * the parent and the child when we're redirecting to a data: URI.
    */
   async PDataChannel(uint32_t channelId);
   async PSimpleChannel(uint32_t channelId);
   async PFileChannel(uint32_t channelId);
 
-  async PRtspController();
-  async PRtspChannel(RtspChannelConnectArgs args);
   async PChannelDiverter(ChannelDiverterArgs channel);
 
   /**
    * These are called from the child with the results of the auth prompt.
    * callbackId is the id that was passed in PBrowser::AsyncAuthPrompt,
    * corresponding to an nsIAuthPromptCallback
    */
   async OnAuthAvailable(uint64_t callbackId, nsString user,
deleted file mode 100644
--- a/netwerk/ipc/PRtspChannel.ipdl
+++ /dev/null
@@ -1,25 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set sw=2 ts=8 et tw=80 ft=cpp : */
-
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * 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/. */
-
-include protocol PNecko;
-include URIParams;
-
-namespace mozilla {
-namespace net {
-
-async protocol PRtspChannel
-{
-  manager PNecko;
-
-parent:
-  // Note: channels are opened during construction, so no open method here:
-  // see PNecko.ipdl
-  async __delete__();
-};
-
-} // namespace net
-} // namespace mozilla
deleted file mode 100644
--- a/netwerk/ipc/PRtspController.ipdl
+++ /dev/null
@@ -1,64 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set sw=2 ts=8 et tw=80 ft=cpp : */
-
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * 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/. */
-
-include protocol PNecko;
-include URIParams;
-
-namespace mozilla {
-namespace net {
-
-/**
- * Defined meta data format.
- */
-union RtspMetaValue
-{
-  bool;
-  uint8_t;
-  uint32_t;
-  uint64_t;
-  nsCString;
-};
-
-/**
- * Key-value pair.
- */
-struct RtspMetadataParam
-{
-  nsCString name;
-  RtspMetaValue value;
-};
-
-async protocol PRtspController
-{
-  manager PNecko;
-
-parent:
-  async AsyncOpen(URIParams aURI);
-  async Play();
-  async Pause();
-  async Resume();
-  async Suspend();
-  async Seek(uint64_t offset);
-  async Stop();
-  async PlaybackEnded();
-  async __delete__();
-
-child:
-  async OnMediaDataAvailable(uint8_t index,
-                             nsCString data,
-                             uint32_t length,
-                             uint32_t offset,
-                             RtspMetadataParam[] meta);
-  async OnConnected(uint8_t index,
-                    RtspMetadataParam[] meta);
-  async OnDisconnected(uint8_t index,
-                       nsresult reason);
-  async AsyncOpenFailed(nsresult reason);
-};
-
-} //namespace net
-} //namespace mozilla
--- a/netwerk/ipc/moz.build
+++ b/netwerk/ipc/moz.build
@@ -22,18 +22,16 @@ UNIFIED_SOURCES += [
 ]
 
 IPDL_SOURCES = [
     'NeckoChannelParams.ipdlh',
     'PChannelDiverter.ipdl',
     'PDataChannel.ipdl',
     'PFileChannel.ipdl',
     'PNecko.ipdl',
-    'PRtspChannel.ipdl',
-    'PRtspController.ipdl',
     'PSimpleChannel.ipdl',
 ]
 
 # needed so --disable-webrtc builds work (yes, a bit messy)
 if not CONFIG['MOZ_WEBRTC']:
   IPDL_SOURCES += [
       '../../media/mtransport/ipc/PStunAddrsRequest.ipdl',
   ]
--- a/netwerk/necko-config.h.in
+++ b/netwerk/necko-config.h.in
@@ -4,21 +4,9 @@
 
 #ifndef _NECKO_CONFIG_H_
 #define _NECKO_CONFIG_H_
 
 #undef NECKO_COOKIES
 
 #undef NECKO_WIFI
 
-#undef NECKO_PROTOCOL_about
-#undef NECKO_PROTOCOL_data
-#undef NECKO_PROTOCOL_device
-#undef NECKO_PROTOCOL_file
-#undef NECKO_PROTOCOL_ftp
-#undef NECKO_PROTOCOL_http
-#undef NECKO_PROTOCOL_res
-#undef NECKO_PROTOCOL_rtsp
-#undef NECKO_PROTOCOL_viewsource
-#undef NECKO_PROTOCOL_websocket
-#undef NECKO_PROTOCOL_wyciwyg
-
 #endif
--- a/netwerk/protocol/moz.build
+++ b/netwerk/protocol/moz.build
@@ -1,7 +1,10 @@
 # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # 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/.
 
-DIRS += sorted(CONFIG['NECKO_PROTOCOLS'])
+DIRS += ['about', 'data', 'device', 'file', 'ftp']
+if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']:
+    DIRS += ['gio']
+DIRS += ['http', 'res', 'viewsource', 'websocket', 'wyciwyg']
--- a/netwerk/streamconv/converters/moz.build
+++ b/netwerk/streamconv/converters/moz.build
@@ -9,29 +9,25 @@ XPIDL_SOURCES += [
 ]
 
 XPIDL_MODULE = 'necko_http'
 
 UNIFIED_SOURCES += [
     'mozTXTToHTMLConv.cpp',
     'nsDirIndex.cpp',
     'nsDirIndexParser.cpp',
+    'nsFTPDirListingConv.cpp',
     'nsHTTPCompressConv.cpp',
     'nsIndexedToHTML.cpp',
     'nsMultiMixedConv.cpp',
     'nsTXTToHTMLConv.cpp',
     'nsUnknownDecoder.cpp',
+    'ParseFTPList.cpp',
 ]
 
-if 'ftp' in CONFIG['NECKO_PROTOCOLS']:
-    UNIFIED_SOURCES += [
-        'nsFTPDirListingConv.cpp',
-        'ParseFTPList.cpp',
-    ]
-
 if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'cocoa':
     UNIFIED_SOURCES += [
         'nsBinHexDecoder.cpp',
     ]
 
 FINAL_LIBRARY = 'xul'
 
 LOCAL_INCLUDES += [
--- a/python/mozbuild/mozbuild/frontend/reader.py
+++ b/python/mozbuild/mozbuild/frontend/reader.py
@@ -112,19 +112,16 @@ class EmptyConfig(object):
         def get(self, key, default=None):
             return self[key]
 
     default_substs = {
         # These 2 variables are used semi-frequently and it isn't worth
         # changing all the instances.
         b'MOZ_APP_NAME': b'empty',
         b'MOZ_CHILD_PROCESS_NAME': b'empty',
-        # Set manipulations are performed within the moz.build files. But
-        # set() is not an exposed symbol, so we can't create an empty set.
-        b'NECKO_PROTOCOLS': set(),
         # Needed to prevent js/src's config.status from loading.
         b'JS_STANDALONE': b'1',
     }
 
     def __init__(self, topsrcdir, substs=None):
         self.topsrcdir = topsrcdir
         self.topobjdir = ''
 
--- a/python/mozbuild/mozbuild/test/configure/test_toolkit_moz_configure.py
+++ b/python/mozbuild/mozbuild/test/configure/test_toolkit_moz_configure.py
@@ -8,66 +8,16 @@ import os
 
 from buildconfig import topsrcdir
 from common import BaseConfigureTest
 from mozunit import main
 from mozbuild.configure.options import InvalidOptionError
 
 
 class TestToolkitMozConfigure(BaseConfigureTest):
-    def test_necko_protocols(self):
-        def get_value(arg):
-            sandbox = self.get_sandbox({}, {}, [arg])
-            return sandbox._value_for(sandbox['necko_protocols'])
-
-        default_protocols = get_value('')
-        self.assertNotEqual(default_protocols, ())
-
-        # Backwards compatibility
-        self.assertEqual(get_value('--enable-necko-protocols'),
-                         default_protocols)
-
-        self.assertEqual(get_value('--enable-necko-protocols=yes'),
-                         default_protocols)
-
-        self.assertEqual(get_value('--enable-necko-protocols=all'),
-                         default_protocols)
-
-        self.assertEqual(get_value('--enable-necko-protocols=default'),
-                         default_protocols)
-
-        self.assertEqual(get_value('--enable-necko-protocols='), ())
-
-        self.assertEqual(get_value('--enable-necko-protocols=no'), ())
-
-        self.assertEqual(get_value('--enable-necko-protocols=none'), ())
-
-        self.assertEqual(get_value('--disable-necko-protocols'), ())
-
-        self.assertEqual(get_value('--enable-necko-protocols=http'),
-                         ('http',))
-
-        self.assertEqual(get_value('--enable-necko-protocols=http,about'),
-                         ('about', 'http'))
-
-        self.assertEqual(get_value('--enable-necko-protocols=http,none'), ())
-
-        self.assertEqual(get_value('--enable-necko-protocols=-http'), ())
-
-        self.assertEqual(get_value('--enable-necko-protocols=none,http'),
-                         ('http',))
-
-        self.assertEqual(
-            get_value('--enable-necko-protocols=all,-http,-about'),
-            tuple(p for p in default_protocols if p not in ('http', 'about')))
-
-        self.assertEqual(
-            get_value('--enable-necko-protocols=default,-http,-about'),
-            tuple(p for p in default_protocols if p not in ('http', 'about')))
-
     def test_developer_options(self):
         def get_value(args=[], environ={}):
             sandbox = self.get_sandbox({}, {}, args, environ)
             return sandbox._value_for(sandbox['developer_options'])
 
         self.assertEqual(get_value(), True)
 
         self.assertEqual(get_value(['--enable-release']), None)
--- a/toolkit/library/moz.build
+++ b/toolkit/library/moz.build
@@ -225,21 +225,16 @@ if not CONFIG['MOZ_TREE_PIXMAN']:
     OS_LIBS += CONFIG['MOZ_PIXMAN_LIBS']
 
 if CONFIG['MOZ_ALSA']:
     OS_LIBS += CONFIG['MOZ_ALSA_LIBS']
 
 if CONFIG['HAVE_CLOCK_MONOTONIC']:
     OS_LIBS += CONFIG['REALTIME_LIBS']
 
-if 'rtsp' in CONFIG['NECKO_PROTOCOLS']:
-    OS_LIBS += [
-        'stagefright_foundation',
-    ]
-
 OS_LIBS += CONFIG['ICONV_LIBS']
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('cocoa', 'uikit'):
     OS_LIBS += CONFIG['TK_LIBS']
 
 if CONFIG['OS_ARCH'] == 'OpenBSD':
     OS_LIBS += [
         'sndio',
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -946,82 +946,16 @@ set_define('MOZ_WEBSPEECH_TEST_BACKEND',
 # ==============================================================
 option('--enable-ipdl-tests', help='Enable expensive IPDL tests')
 
 set_config('MOZ_IPDL_TESTS',
            depends_if('--enable-ipdl-tests')(lambda _: True))
 
 include('nss.configure')
 
-# Network protocol support
-# ==============================================================
-@depends(check_build_environment, toolkit_gtk, '--help')
-@imports('os')
-@imports(_from='__builtin__', _import='sorted')
-def all_necko_protocols(build_env, toolkit_gtk, _):
-    basedir = os.path.join(build_env.topsrcdir, 'netwerk', 'protocol')
-    return tuple(sorted(p for p in os.listdir(basedir)
-                        if (os.path.isdir(os.path.join(basedir, p)) and
-                            (p != 'gio' or toolkit_gtk))))
-
-default_necko_protocols = all_necko_protocols
-
-@deprecated_option('--enable-necko-protocols', nargs='*')
-def necko_protocols(protocols):
-    return protocols
-
-@depends(necko_protocols, default_necko_protocols)
-def necko_protocols(protocols, default_protocols):
-    if protocols is None or (protocols and len(protocols) == 0):
-        return None
-    if len(protocols) == 1 and protocols[0] == '':
-        return False
-    result = set()
-    for p in protocols:
-        if p in ('yes', 'all', 'default'):
-            result |= set(default_protocols)
-            continue
-        if p in ('no', 'none'):
-            result = set()
-            continue
-        if p.startswith('-'):
-            if p[1:] in result:
-                result.remove(p[1:])
-        else:
-            result.add(p)
-    if result != set(default_protocols):
-        return tuple(result)
-
-imply_option('--enable-network-protocols', necko_protocols,
-             reason='--enable-necko-protocols')
-
-option('--enable-network-protocols', nargs='+', default=default_necko_protocols,
-       choices=all_necko_protocols,
-       help='Enable/disable specific protocol handlers')
-
-@depends('--enable-network-protocols')
-def necko_protocol_defines(protocols):
-    return tuple('NECKO_PROTOCOL_%s' % p for p in protocols)
-
-add_old_configure_assignment('_NON_GLOBAL_ACDEFINES', necko_protocol_defines)
-
-@depends(necko_protocol_defines)
-@imports('__sandbox__')
-def set_necko_protocol_defines(protocols):
-    for p in protocols:
-        __sandbox__.set_define_impl(p, True)
-
-@depends('--enable-network-protocols')
-@imports(_from='__builtin__', _import='sorted')
-def necko_protocols(protocols):
-    return tuple(sorted(protocols))
-
-set_config('NECKO_PROTOCOLS', necko_protocols)
-add_old_configure_assignment('NECKO_PROTOCOLS', necko_protocols)
-
 # Graphics
 # ==============================================================
 option('--disable-skia', help='Disable use of Skia')
 
 @depends('--disable-skia')
 def skia(value):
     if not value:
         die('--disable-skia is not supported anymore')