Bug 1488236 - Remove the XPCOM component registration for nsApplicationCacheNamespace; r=valentin
authorEhsan Akhgari <ehsan@mozilla.com>
Mon, 03 Sep 2018 11:06:31 -0400
changeset 434512 650e1b5d0446e5b150e77c56c0a87e0a970adef0
parent 434511 9dbafdb2ecb6fd26a803321a7482b2f2a581f7e4
child 434513 3d8df5a41dc520e8fc3168e42104a7f4995422f4
push id107404
push usereakhgari@mozilla.com
push dateMon, 03 Sep 2018 18:28:47 +0000
treeherdermozilla-inbound@650e1b5d0446 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersvalentin
bugs1488236
milestone63.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 1488236 - Remove the XPCOM component registration for nsApplicationCacheNamespace; r=valentin Differential Revision: https://phabricator.services.mozilla.com/D4877
netwerk/build/nsNetCID.h
netwerk/build/nsNetModule.cpp
netwerk/cache/moz.build
uriloader/prefetch/nsOfflineCacheUpdate.cpp
--- a/netwerk/build/nsNetCID.h
+++ b/netwerk/build/nsNetCID.h
@@ -528,26 +528,16 @@
 #define NS_APPLICATIONCACHESERVICE_CID               \
 { /* 02bf7a2a-39d8-4a23-a50c-2cbb085ab7a5 */         \
     0x02bf7a2a,                                      \
     0x39d8,                                          \
     0x4a23,                                          \
     {0xa5, 0x0c, 0x2c, 0xbb, 0x08, 0x5a, 0xb7, 0xa5} \
 }
 
-#define NS_APPLICATIONCACHENAMESPACE_CONTRACTID \
-    "@mozilla.org/network/application-cache-namespace;1"
-#define NS_APPLICATIONCACHENAMESPACE_CID             \
-{ /* b00ed78a-04e2-4f74-8e1c-d1af79dfd12f */         \
-    0xb00ed78a,                                      \
-    0x04e2,                                          \
-    0x4f74,                                          \
-   {0x8e, 0x1c, 0xd1, 0xaf, 0x79, 0xdf, 0xd1, 0x2f}  \
-}
-
 /******************************************************************************
  * netwerk/protocol/http/ classes
  */
 
 #define NS_HTTPPROTOCOLHANDLER_CID \
 { /* 4f47e42e-4d23-4dd3-bfda-eb29255e9ea3 */         \
     0x4f47e42e,                                      \
     0x4d23,                                          \
--- a/netwerk/build/nsNetModule.cpp
+++ b/netwerk/build/nsNetModule.cpp
@@ -224,17 +224,16 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsSafeAbo
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsNestedAboutURIMutator)
 
 // about
 #include "nsAboutCache.h"
 #include "nsAboutCacheEntry.h"
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsAboutCacheEntry)
 
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsApplicationCacheService)
-NS_GENERIC_FACTORY_CONSTRUCTOR(nsApplicationCacheNamespace)
 
 // file
 #include "nsFileProtocolHandler.h"
 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsFileProtocolHandler, Init)
 
 // ftp
 #include "nsFtpProtocolHandler.h"
 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsFtpProtocolHandler, Init)
@@ -736,17 +735,16 @@ NS_DEFINE_NAMED_CID(NS_NESTEDABOUTURI_CI
 NS_DEFINE_NAMED_CID(NS_NESTEDABOUTURIMUTATOR_CID);
 NS_DEFINE_NAMED_CID(NS_ABOUT_CACHE_MODULE_CID);
 NS_DEFINE_NAMED_CID(NS_ABOUT_CACHE_ENTRY_MODULE_CID);
 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);
 #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
 NS_DEFINE_NAMED_CID(NS_DATAPROTOCOLHANDLER_CID);
@@ -857,17 +855,16 @@ static const mozilla::Module::CIDEntry k
     { &kNS_NESTEDABOUTURIMUTATOR_CID, false, nullptr, nsNestedAboutURIMutatorConstructor },
     { &kNS_ABOUT_CACHE_MODULE_CID, false, nullptr, nsAboutCache::Create },
     { &kNS_ABOUT_CACHE_ENTRY_MODULE_CID, false, nullptr, nsAboutCacheEntryConstructor },
     { &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 },
 #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
     { &kNS_DATAPROTOCOLHANDLER_CID, false, nullptr, nsDataHandler::Create },
@@ -981,17 +978,16 @@ static const mozilla::Module::ContractID
     { NS_ABOUT_MODULE_CONTRACTID_PREFIX "blank", &kNS_ABOUT_BLANK_MODULE_CID },
     { NS_ABOUT_MODULE_CONTRACTID_PREFIX "cache", &kNS_ABOUT_CACHE_MODULE_CID },
     { NS_ABOUT_MODULE_CONTRACTID_PREFIX "cache-entry", &kNS_ABOUT_CACHE_ENTRY_MODULE_CID },
     { 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 },
 #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
     { NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "data", &kNS_DATAPROTOCOLHANDLER_CID },
--- a/netwerk/cache/moz.build
+++ b/netwerk/cache/moz.build
@@ -16,18 +16,20 @@ XPIDL_SOURCES += [
     'nsICacheVisitor.idl',
 ]
 
 XPIDL_MODULE = 'necko_cache'
 
 EXPORTS += [
     'nsApplicationCache.h',
     'nsApplicationCacheService.h',
+    'nsCacheDevice.h',
     'nsCacheService.h',
-    'nsDeleteDir.h'
+    'nsDeleteDir.h',
+    'nsDiskCacheDeviceSQL.h',
 ]
 
 UNIFIED_SOURCES += [
     'nsApplicationCacheService.cpp',
     'nsCache.cpp',
     'nsCacheEntry.cpp',
     'nsCacheEntryDescriptor.cpp',
     'nsCacheMetaData.cpp',
--- a/uriloader/prefetch/nsOfflineCacheUpdate.cpp
+++ b/uriloader/prefetch/nsOfflineCacheUpdate.cpp
@@ -33,16 +33,17 @@
 #include "nsProxyRelease.h"
 #include "nsIConsoleService.h"
 #include "mozilla/Logging.h"
 #include "nsIAsyncVerifyRedirectCallback.h"
 #include "mozilla/Preferences.h"
 #include "mozilla/Attributes.h"
 #include "nsContentUtils.h"
 #include "nsIPrincipal.h"
+#include "nsDiskCacheDeviceSQL.h"
 
 #include "nsXULAppAPI.h"
 
 using namespace mozilla;
 
 static const uint32_t kRescheduleLimit = 3;
 // Max number of retries for every entry of pinned app.
 static const uint32_t kPinnedEntryRetriesLimit = 3;
@@ -786,18 +787,17 @@ nsOfflineManifestItem::AddNamespace(uint
 {
     nsresult rv;
     if (!mNamespaces) {
         mNamespaces = do_CreateInstance(NS_ARRAY_CONTRACTID, &rv);
         NS_ENSURE_SUCCESS(rv, rv);
     }
 
     nsCOMPtr<nsIApplicationCacheNamespace> ns =
-        do_CreateInstance(NS_APPLICATIONCACHENAMESPACE_CONTRACTID, &rv);
-    NS_ENSURE_SUCCESS(rv, rv);
+        new nsApplicationCacheNamespace();
 
     rv = ns->Init(namespaceType, namespaceSpec, data);
     NS_ENSURE_SUCCESS(rv, rv);
 
     rv = mNamespaces->AppendElement(ns);
     NS_ENSURE_SUCCESS(rv, rv);
 
     return NS_OK;