Bug 1340030: Remove necko_standalone lib (netwerk/standalone/). r=mcmanus
authorDavid Major <dmajor@mozilla.com>
Fri, 17 Feb 2017 15:17:39 +1300
changeset 392430 07511f8a1a017af6965799f4ff310fb8a2eb9aa2
parent 392429 e9085a52b43c7ac1edb81fd9314f6cd0662f2874
child 392431 e30f0dadec1da990c321035c195be9271082c49c
push id1468
push userasasaki@mozilla.com
push dateMon, 05 Jun 2017 19:31:07 +0000
treeherdermozilla-release@0641fc6ee9d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmcmanus
bugs1340030, 1239866, 1239870, 1237409
milestone54.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1340030: Remove necko_standalone lib (netwerk/standalone/). r=mcmanus The only users of this library were removed by bug 1239866 and bug 1239870 as part of the larger removal of libxpcomrt in bug 1237409.
netwerk/moz.build
netwerk/standalone/moz.build
netwerk/standalone/nsNetModuleStandalone.cpp
netwerk/standalone/nsNetModuleStandalone.h
--- a/netwerk/moz.build
+++ b/netwerk/moz.build
@@ -14,17 +14,16 @@ DIRS += [
     'socket',
     'mime',
     'streamconv',
     'cache',
     'cache2',
     'protocol',
     'system',
     'ipc',
-    'standalone',
 ]
 
 if CONFIG['MOZ_SRTP']:
     DIRS += ['srtp/src']
 
 if CONFIG['MOZ_SCTP']:
     DIRS += ['sctp/src', 'sctp/datachannel']
 
deleted file mode 100644
--- a/netwerk/standalone/moz.build
+++ /dev/null
@@ -1,54 +0,0 @@
-# -*- 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/.
-
-if CONFIG['OS_TARGET'] != 'WINNT' and CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gonk':
-    Library('necko_standalone')
-
-src_list = [
-    'nsNetModuleStandalone.cpp',
-]
-
-netwerk_base_src = [
-    'PollableEvent.cpp',
-    'nsDNSPrefetch.cpp',
-    'nsNetAddr.cpp',
-    'nsSocketTransportService2.cpp',
-    'nsURLHelper.cpp',
-]
-src_list += [
-    '/netwerk/base/%s' % s for s in netwerk_base_src
-]
-
-netwerk_dns_src = [
-    'nsHostResolver.cpp',
-    'DNS.cpp',
-    'DNSListenerProxy.cpp',
-    'GetAddrInfo.cpp',
-    'nameprep.c',
-    'nsDNSService2.cpp',
-    'nsIDNService.cpp',
-    'punycode.c',
-]
-src_list += [
-    '/netwerk/dns/%s' % s for s in netwerk_dns_src
-]
-
-SOURCES += sorted(src_list)
-
-LOCAL_INCLUDES = [
-    '../base',
-    '../build',
-    '../dns',
-]
-
-DEFINES['IDNA2008'] = False
-DEFINES['MOZILLA_INTERNAL_API'] = True
-DEFINES['MOZILLA_EXTERNAL_LINKAGE'] = True
-
-include('/ipc/chromium/chromium-config.mozbuild')
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wno-error=shadow']
deleted file mode 100644
--- a/netwerk/standalone/nsNetModuleStandalone.cpp
+++ /dev/null
@@ -1,119 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* vim: set sw=4 ts=8 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/. */
-
-#include "necko-config.h"
-
-#include "mozilla/ModuleUtils.h"
-#include "mozilla/DebugOnly.h"
-#include "nsCOMPtr.h"
-#include "nsICategoryManager.h"
-#include "nsIClassInfoImpl.h"
-#include "nsIComponentManager.h"
-#include "nsIServiceManager.h"
-#include "nsNetCID.h"
-#include "nsPIDNSService.h"
-#include "nsPISocketTransportService.h"
-#include "nscore.h"
-
-extern const mozilla::Module kNeckoStandaloneModule;
-
-namespace mozilla {
-
-nsresult
-InitNetModuleStandalone()
-{
-  nsresult rv;
-
-  nsCOMPtr<nsPIDNSService> dns = do_GetService(NS_DNSSERVICE_CONTRACTID, &rv);
-  if (NS_SUCCEEDED(rv)) {
-    mozilla::DebugOnly<nsresult> rv = dns->Init();
-    NS_ASSERTION(NS_SUCCEEDED(rv), "DNS service init failed");
-  } else {
-    NS_WARNING("failed to get dns service");
-  }
-
-  nsCOMPtr<nsPISocketTransportService> sts = do_GetService(NS_SOCKETTRANSPORTSERVICE_CONTRACTID, &rv);
-  if (NS_SUCCEEDED(rv)) {
-    mozilla::DebugOnly<nsresult> rv = sts->Init();
-    NS_ASSERTION(NS_SUCCEEDED(rv), "Socket transport service init failed");
-  } else {
-    NS_WARNING("failed to get socket transport service");
-  }
-
-  return NS_OK;
-}
-
-nsresult
-ShutdownNetModuleStandalone()
-{
-  nsresult rv;
-
-  nsCOMPtr<nsPIDNSService> dns = do_GetService(NS_DNSSERVICE_CONTRACTID, &rv);
-  if (NS_SUCCEEDED(rv)) {
-    mozilla::DebugOnly<nsresult> rv = dns->Shutdown();
-    NS_ASSERTION(NS_SUCCEEDED(rv), "DNS service shutdown failed");
-  } else {
-    NS_WARNING("failed to get dns service");
-  }
-
-  nsCOMPtr<nsPISocketTransportService> sts = do_GetService(NS_SOCKETTRANSPORTSERVICE_CONTRACTID, &rv);
-  if (NS_SUCCEEDED(rv)) {
-    mozilla::DebugOnly<nsresult> rv = sts->Shutdown(true);
-    NS_ASSERTION(NS_SUCCEEDED(rv), "Socket transport service shutdown failed");
-  } else {
-    NS_WARNING("failed to get socket transport service");
-  }
-
-  return NS_OK;
-}
-
-} // namespace mozilla
-
-#include "nsDNSService2.h"
-NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsIDNSService,
-  nsDNSService::GetXPCOMSingleton)
-
-#include "nsSocketTransportService2.h"
-typedef mozilla::net::nsSocketTransportService nsSocketTransportService;
-#undef LOG
-#undef LOG_ENABLED
-NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsSocketTransportService, Init)
-
-// Net module startup hook
-static nsresult nsNetStartup()
-{
-    return NS_OK;
-}
-
-// Net module shutdown hook
-static void nsNetShutdown()
-{
-}
-
-NS_DEFINE_NAMED_CID(NS_SOCKETTRANSPORTSERVICE_CID);
-NS_DEFINE_NAMED_CID(NS_DNSSERVICE_CID);
-
-static const mozilla::Module::CIDEntry kNeckoCIDs[] = {
-    { &kNS_SOCKETTRANSPORTSERVICE_CID, false, nullptr, nsSocketTransportServiceConstructor },
-    { &kNS_DNSSERVICE_CID, false, nullptr, nsIDNSServiceConstructor },
-    { nullptr }
-};
-
-static const mozilla::Module::ContractIDEntry kNeckoContracts[] = {
-    { NS_SOCKETTRANSPORTSERVICE_CONTRACTID, &kNS_SOCKETTRANSPORTSERVICE_CID },
-    { NS_DNSSERVICE_CONTRACTID, &kNS_DNSSERVICE_CID },
-    { nullptr }
-};
-
-const mozilla::Module kNeckoStandaloneModule = {
-    mozilla::Module::kVersion,
-    kNeckoCIDs,
-    kNeckoContracts,
-    nullptr,
-    nullptr,
-    nsNetStartup,
-    nsNetShutdown
-};
deleted file mode 100644
--- a/netwerk/standalone/nsNetModuleStandalone.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#ifndef ns_net_module_standalone_h_
-#define ns_net_module_standalone_h_
-
-#include <nsError.h>
-
-namespace mozilla {
-
-nsresult InitNetModuleStandalone();
-nsresult ShutdownNetModuleStandalone();
-
-} // namespace mozilla
-
-#endif //  ns_net_module_standalone_h_