Bug 1432271 - Remove dom/time; r?baku draft
authorKyle Machulis <kyle@nonpolynomial.com>
Mon, 22 Jan 2018 12:50:11 -0800
changeset 747883 995b0b3eb87c8fee13b6c1f7f2a905ca8bc1fed8
parent 747882 3dd5c2736825d2e002f4e435e64c516dc2e7b6fe
child 747884 418ce7fe3263e03b9d27b977d67bf8e2c8b5f906
child 747885 20811478ade14b759aa905ef8b240c5076f7fd7f
push id97030
push userbmo:kyle@nonpolynomial.com
push dateSat, 27 Jan 2018 00:01:38 +0000
reviewersbaku
bugs1432271
milestone60.0a1
Bug 1432271 - Remove dom/time; r?baku dom/time contained the TimeService and TimeManager classes, used for setting time via Gecko on FirefoxOS. Since FirefoxOS is no longer in the code base, the directory can be removed. MozReview-Commit-ID: 8PEk3e6HA67
dom/base/Navigator.cpp
dom/base/Navigator.h
dom/base/moz.build
dom/base/nsGlobalWindowInner.cpp
dom/base/nsGlobalWindowInner.h
dom/base/nsGlobalWindowOuter.cpp
dom/base/nsPIDOMWindow.h
dom/bindings/Bindings.conf
dom/ipc/ContentChild.cpp
dom/ipc/ContentParent.cpp
dom/moz.build
dom/time/DateCacheCleaner.cpp
dom/time/DateCacheCleaner.h
dom/time/TimeChangeObserver.cpp
dom/time/TimeChangeObserver.h
dom/time/TimeManager.cpp
dom/time/TimeManager.h
dom/time/TimeService.cpp
dom/time/TimeService.h
dom/time/moz.build
dom/time/nsITimeService.idl
dom/webidl/MozTimeManager.webidl
dom/webidl/Navigator.webidl
dom/webidl/moz.build
layout/build/nsLayoutModule.cpp
layout/build/nsLayoutStatics.cpp
--- a/dom/base/Navigator.cpp
+++ b/dom/base/Navigator.cpp
@@ -57,17 +57,16 @@
 #include "nsMimeTypes.h"
 #include "nsNetUtil.h"
 #include "nsRFPService.h"
 #include "nsStringStream.h"
 #include "nsComponentManagerUtils.h"
 #include "nsIStringStream.h"
 #include "nsIHttpChannel.h"
 #include "nsIHttpChannelInternal.h"
-#include "TimeManager.h"
 #include "nsStreamUtils.h"
 #include "WidgetUtils.h"
 #include "nsIPresentationService.h"
 #include "nsIScriptError.h"
 
 #include "mozilla/dom/MediaDevices.h"
 #include "MediaManager.h"
 
@@ -193,17 +192,16 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mPermissions)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mGeolocation)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mBatteryManager)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mBatteryPromise)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mConnection)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mStorageManager)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mCredentials)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mMediaDevices)
-  NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mTimeManager)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mServiceWorkerContainer)
 
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mWindow)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mMediaKeySystemAccessManager)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mPresentation)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mGamepadServiceTest)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mVRGetDisplaysPromises)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mVRServiceTest)
@@ -243,20 +241,16 @@ Navigator::Invalidate()
 
   if (mConnection) {
     mConnection->Shutdown();
     mConnection = nullptr;
   }
 
   mMediaDevices = nullptr;
 
-  if (mTimeManager) {
-    mTimeManager = nullptr;
-  }
-
   if (mPresentation) {
     mPresentation = nullptr;
   }
 
   mServiceWorkerContainer = nullptr;
 
   if (mMediaKeySystemAccessManager) {
     mMediaKeySystemAccessManager->Shutdown();
@@ -1497,33 +1491,16 @@ Navigator::GetConnection(ErrorResult& aR
       return nullptr;
     }
     mConnection = network::Connection::CreateForWindow(mWindow);
   }
 
   return mConnection;
 }
 
-#ifdef MOZ_TIME_MANAGER
-time::TimeManager*
-Navigator::GetMozTime(ErrorResult& aRv)
-{
-  if (!mWindow) {
-    aRv.Throw(NS_ERROR_UNEXPECTED);
-    return nullptr;
-  }
-
-  if (!mTimeManager) {
-    mTimeManager = new time::TimeManager(mWindow);
-  }
-
-  return mTimeManager;
-}
-#endif
-
 already_AddRefed<ServiceWorkerContainer>
 Navigator::ServiceWorker()
 {
   MOZ_ASSERT(mWindow);
 
   if (!mServiceWorkerContainer) {
     mServiceWorkerContainer = new ServiceWorkerContainer(mWindow);
   }
--- a/dom/base/Navigator.h
+++ b/dom/base/Navigator.h
@@ -70,21 +70,18 @@ class Connection;
 } // namespace network
 
 class Presentation;
 class LegacyMozTCPSocket;
 class VRDisplay;
 class VRServiceTest;
 class StorageManager;
 
-namespace time {
-class TimeManager;
-} // namespace time
-
-class Navigator final : public nsISupports
+class Navigator final : public nsIDOMNavigator
+                      , public nsIMozNavigatorNetwork
                       , public nsWrapperCache
 {
 public:
   explicit Navigator(nsPIDOMWindowInner* aInnerWindow);
 
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(Navigator)
 
@@ -177,19 +174,16 @@ public:
   GamepadServiceTest* RequestGamepadServiceTest();
   already_AddRefed<Promise> GetVRDisplays(ErrorResult& aRv);
   void GetActiveVRDisplays(nsTArray<RefPtr<VRDisplay>>& aDisplays) const;
   VRServiceTest* RequestVRServiceTest();
   bool IsWebVRContentDetected() const;
   bool IsWebVRContentPresenting() const;
   void RequestVRPresentation(VRDisplay& aDisplay);
   nsINetworkProperties* GetNetworkProperties();
-#ifdef MOZ_TIME_MANAGER
-  time::TimeManager* GetMozTime(ErrorResult& aRv);
-#endif // MOZ_TIME_MANAGER
 
   Presentation* GetPresentation(ErrorResult& aRv);
 
   bool SendBeacon(const nsAString& aUrl,
                   const Nullable<fetch::BodyInit>& aData,
                   ErrorResult& aRv);
 
   void MozGetUserMedia(const MediaStreamConstraints& aConstraints,
@@ -266,17 +260,16 @@ private:
   RefPtr<nsPluginArray> mPlugins;
   RefPtr<Permissions> mPermissions;
   RefPtr<Geolocation> mGeolocation;
   RefPtr<battery::BatteryManager> mBatteryManager;
   RefPtr<Promise> mBatteryPromise;
   RefPtr<network::Connection> mConnection;
   RefPtr<CredentialsContainer> mCredentials;
   RefPtr<MediaDevices> mMediaDevices;
-  RefPtr<time::TimeManager> mTimeManager;
   RefPtr<ServiceWorkerContainer> mServiceWorkerContainer;
   nsCOMPtr<nsPIDOMWindowInner> mWindow;
   RefPtr<Presentation> mPresentation;
   RefPtr<GamepadServiceTest> mGamepadServiceTest;
   nsTArray<RefPtr<Promise> > mVRGetDisplaysPromises;
   RefPtr<VRServiceTest> mVRServiceTest;
   nsTArray<uint32_t> mRequestedVibrationPattern;
   RefPtr<StorageManager> mStorageManager;
--- a/dom/base/moz.build
+++ b/dom/base/moz.build
@@ -421,17 +421,16 @@ EXTRA_JS_MODULES += [
     'IndexedDBHelper.jsm',
 ]
 
 LOCAL_INCLUDES += [
     '../battery',
     '../events',
     '../media',
     '../network',
-    '../time',
     '/caps',
     '/docshell/base',
     '/dom/base',
     '/dom/file',
     '/dom/geolocation',
     '/dom/html',
     '/dom/ipc',
     '/dom/storage',
--- a/dom/base/nsGlobalWindowInner.cpp
+++ b/dom/base/nsGlobalWindowInner.cpp
@@ -223,17 +223,16 @@
 #include "mozilla/Services.h"
 #include "mozilla/Telemetry.h"
 #include "mozilla/dom/Location.h"
 #include "nsHTMLDocument.h"
 #include "nsWrapperCacheInlines.h"
 #include "mozilla/DOMEventTargetHelper.h"
 #include "prrng.h"
 #include "nsSandboxFlags.h"
-#include "TimeChangeObserver.h"
 #include "mozilla/dom/AudioContext.h"
 #include "mozilla/dom/BrowserElementDictionariesBinding.h"
 #include "mozilla/dom/cache/CacheStorage.h"
 #include "mozilla/dom/Console.h"
 #include "mozilla/dom/Fetch.h"
 #include "mozilla/dom/FunctionBinding.h"
 #include "mozilla/dom/HashChangeEvent.h"
 #include "mozilla/dom/IntlUtils.h"
@@ -6868,28 +6867,16 @@ nsGlobalWindowInner::IsVRContentPresenti
     if (display->IsAnyPresenting(gfx::kVRGroupAll)) {
       return true;
     }
   }
   return false;
 }
 
 void
-nsGlobalWindowInner::EnableTimeChangeNotifications()
-{
-  mozilla::time::AddWindowListener(this);
-}
-
-void
-nsGlobalWindowInner::DisableTimeChangeNotifications()
-{
-  mozilla::time::RemoveWindowListener(this);
-}
-
-void
 nsGlobalWindowInner::AddSizeOfIncludingThis(nsWindowSizes& aWindowSizes) const
 {
   aWindowSizes.mDOMOtherSize += aWindowSizes.mState.mMallocSizeOf(this);
 
   EventListenerManager* elm = GetExistingListenerManager();
   if (elm) {
     aWindowSizes.mDOMOtherSize +=
       elm->SizeOfIncludingThis(aWindowSizes.mState.mMallocSizeOf);
--- a/dom/base/nsGlobalWindowInner.h
+++ b/dom/base/nsGlobalWindowInner.h
@@ -484,19 +484,16 @@ public:
   virtual void EnableDeviceSensor(uint32_t aType) override;
   virtual void DisableDeviceSensor(uint32_t aType) override;
 
 #if defined(MOZ_WIDGET_ANDROID)
   virtual void EnableOrientationChangeListener() override;
   virtual void DisableOrientationChangeListener() override;
 #endif
 
-  virtual void EnableTimeChangeNotifications() override;
-  virtual void DisableTimeChangeNotifications() override;
-
   bool IsClosedOrClosing() {
     return mCleanedUp;
   }
 
   bool
   IsCleanedUp() const
   {
     return mCleanedUp;
--- a/dom/base/nsGlobalWindowOuter.cpp
+++ b/dom/base/nsGlobalWindowOuter.cpp
@@ -221,17 +221,16 @@
 #include "mozilla/Services.h"
 #include "mozilla/Telemetry.h"
 #include "mozilla/dom/Location.h"
 #include "nsHTMLDocument.h"
 #include "nsWrapperCacheInlines.h"
 #include "mozilla/DOMEventTargetHelper.h"
 #include "prrng.h"
 #include "nsSandboxFlags.h"
-#include "TimeChangeObserver.h"
 #include "mozilla/dom/AudioContext.h"
 #include "mozilla/dom/BrowserElementDictionariesBinding.h"
 #include "mozilla/dom/cache/CacheStorage.h"
 #include "mozilla/dom/Console.h"
 #include "mozilla/dom/Fetch.h"
 #include "mozilla/dom/FunctionBinding.h"
 #include "mozilla/dom/HashChangeEvent.h"
 #include "mozilla/dom/IntlUtils.h"
--- a/dom/base/nsPIDOMWindow.h
+++ b/dom/base/nsPIDOMWindow.h
@@ -553,19 +553,16 @@ public:
    */
   virtual void DisableDeviceSensor(uint32_t aType) = 0;
 
 #if defined(MOZ_WIDGET_ANDROID)
   virtual void EnableOrientationChangeListener() = 0;
   virtual void DisableOrientationChangeListener() = 0;
 #endif
 
-  virtual void EnableTimeChangeNotifications() = 0;
-  virtual void DisableTimeChangeNotifications() = 0;
-
   /**
    * Tell this window that there is an observer for gamepad input
    *
    * Inner windows only.
    */
   virtual void SetHasGamepadEventListener(bool aHasGamepad = true) = 0;
 
   /**
--- a/dom/bindings/Bindings.conf
+++ b/dom/bindings/Bindings.conf
@@ -593,20 +593,16 @@ DOMInterfaces = {
     'nativeType': 'mozilla::dom::HTMLCanvasPrintState',
 },
 
 'MozChannel': {
     'nativeType': 'nsIChannel',
     'notflattened': True
 },
 
-'MozTimeManager': {
-    'nativeType': 'mozilla::dom::time::TimeManager',
-},
-
 'MozStorageAsyncStatementParams': {
     'headerFile': 'mozilla/storage/mozStorageAsyncStatementParams.h',
     'nativeType': 'mozilla::storage::AsyncStatementParams',
 },
 
 'MozStorageStatementParams': {
     'headerFile': 'mozilla/storage/mozStorageStatementParams.h',
     'nativeType': 'mozilla::storage::StatementParams',
--- a/dom/ipc/ContentChild.cpp
+++ b/dom/ipc/ContentChild.cpp
@@ -206,17 +206,16 @@
 
 #include "ClearOnShutdown.h"
 #include "ProcessUtils.h"
 #include "URIUtils.h"
 #include "nsContentUtils.h"
 #include "nsIPrincipal.h"
 #include "DomainPolicy.h"
 #include "mozilla/dom/ipc/StructuredCloneData.h"
-#include "mozilla/dom/time/DateCacheCleaner.h"
 #include "mozilla/ipc/CrashReporterClient.h"
 #include "mozilla/net/NeckoMessageUtils.h"
 #include "mozilla/widget/PuppetBidiKeyboard.h"
 #include "mozilla/RemoteSpellCheckEngineChild.h"
 #include "GMPServiceChild.h"
 #include "GfxInfoBase.h"
 #include "gfxPlatform.h"
 #include "nscore.h" // for NS_FREE_PERMANENT_DATA
@@ -1217,19 +1216,16 @@ ContentChild::InitXPCOM(const XPCOMInitD
     ProcessGlobal* global = ProcessGlobal::Get();
     global->SetInitialProcessData(data);
   }
 
   // The stylesheet cache is not ready yet. Store this URL for future use.
   nsCOMPtr<nsIURI> ucsURL = DeserializeURI(aXPCOMInit.userContentSheetURL());
   nsLayoutStylesheetCache::SetUserContentCSSURL(ucsURL);
 
-  // This will register cross-process observer.
-  mozilla::dom::time::InitializeDateCacheCleaner();
-
   GfxInfoBase::SetFeatureStatus(aXPCOMInit.gfxFeatureStatus());
 
   DataStorage::SetCachedStorageEntries(aXPCOMInit.dataStorage());
 
   // Set the dynamic scalar definitions for this process.
   TelemetryIPC::AddDynamicScalarDefinitions(aXPCOMInit.dynamicScalarDefs());
 
   DOMPrefs::Initialize();
--- a/dom/ipc/ContentParent.cpp
+++ b/dom/ipc/ContentParent.cpp
@@ -52,17 +52,16 @@
 #include "mozilla/dom/PCycleCollectWithLogsParent.h"
 #include "mozilla/dom/ServiceWorkerRegistrar.h"
 #include "mozilla/dom/power/PowerManagerService.h"
 #include "mozilla/dom/Permissions.h"
 #include "mozilla/dom/PresentationParent.h"
 #include "mozilla/dom/PPresentationParent.h"
 #include "mozilla/dom/PushNotifier.h"
 #include "mozilla/dom/quota/QuotaManagerService.h"
-#include "mozilla/dom/time/DateCacheCleaner.h"
 #include "mozilla/dom/URLClassifierParent.h"
 #include "mozilla/embedding/printingui/PrintingParent.h"
 #include "mozilla/extensions/StreamFilterParent.h"
 #include "mozilla/gfx/gfxVars.h"
 #include "mozilla/gfx/GPUProcessManager.h"
 #include "mozilla/hal_sandbox/PHalParent.h"
 #include "mozilla/ipc/BackgroundChild.h"
 #include "mozilla/ipc/BackgroundParent.h"
@@ -623,18 +622,16 @@ ContentParent::StartUp()
 
   if (!XRE_IsParentProcess()) {
     return;
   }
 
   // Note: This reporter measures all ContentParents.
   RegisterStrongMemoryReporter(new ContentParentsMemoryReporter());
 
-  mozilla::dom::time::InitializeDateCacheCleaner();
-
   BackgroundChild::Startup();
   ClientManager::Startup();
 
   sDisableUnsafeCPOWWarnings = PR_GetEnv("DISABLE_UNSAFE_CPOW_WARNINGS");
 
 #if defined(XP_LINUX) && defined(MOZ_CONTENT_SANDBOX)
   sSandboxBrokerPolicyFactory = MakeUnique<SandboxBrokerPolicyFactory>();
 #endif
--- a/dom/moz.build
+++ b/dom/moz.build
@@ -69,17 +69,16 @@ DIRS += [
     'notification',
     'offline',
     'power',
     'push',
     'quota',
     'security',
     'storage',
     'svg',
-    'time',
     'locales',
     'network',
     'permission',
     'plugins/base',
     'plugins/ipc',
     'indexedDB',
     'system',
     'ipc',
deleted file mode 100644
--- a/dom/time/DateCacheCleaner.cpp
+++ /dev/null
@@ -1,54 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 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 "DateCacheCleaner.h"
-
-#include "js/Date.h"
-#include "mozilla/dom/ScriptSettings.h"
-#include "mozilla/ClearOnShutdown.h"
-#include "mozilla/Hal.h"
-#include "mozilla/StaticPtr.h"
-
-using namespace mozilla::hal;
-
-namespace mozilla {
-namespace dom {
-namespace time {
-
-class DateCacheCleaner : public SystemTimezoneChangeObserver
-{
-public:
-  DateCacheCleaner()
-  {
-    RegisterSystemTimezoneChangeObserver(this);
-  }
-
-  ~DateCacheCleaner()
-  {
-    UnregisterSystemTimezoneChangeObserver(this);
-  }
-
-  void Notify(const SystemTimezoneChangeInformation& aSystemTimezoneChangeInfo) override
-  {
-    JS::ResetTimeZone();
-  }
-
-};
-
-StaticAutoPtr<DateCacheCleaner> sDateCacheCleaner;
-
-void
-InitializeDateCacheCleaner()
-{
-  if (!sDateCacheCleaner) {
-    sDateCacheCleaner = new DateCacheCleaner();
-    ClearOnShutdown(&sDateCacheCleaner);
-  }
-}
-
-} // namespace time
-} // namespace dom
-} // namespace mozilla
deleted file mode 100644
--- a/dom/time/DateCacheCleaner.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 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/. */
-
-/*
- * InitializeDateCacheCleaner registers DateCacheCleaner to
- * SystemTimeChangeObserver. When time zone is changed, DateCacheCleaner calls
- * JS::ResetTimeZone to update the time zone information.
- */
-
-namespace mozilla {
-namespace dom {
-namespace time {
-void InitializeDateCacheCleaner();
-} //namespace time
-} //namespace dom
-} //namespace mozilla
deleted file mode 100644
--- a/dom/time/TimeChangeObserver.cpp
+++ /dev/null
@@ -1,166 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 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 "TimeChangeObserver.h"
-#include "mozilla/Hal.h"
-#include "mozilla/Observer.h"
-#include "mozilla/HalTypes.h"
-#include "nsWeakPtr.h"
-#include "nsTObserverArray.h"
-#include "mozilla/ClearOnShutdown.h"
-#include "mozilla/Services.h"
-#include "mozilla/StaticPtr.h"
-#include "nsPIDOMWindow.h"
-#include "nsContentUtils.h"
-#include "nsIObserverService.h"
-#include "nsIDocument.h"
-
-using namespace mozilla;
-using namespace mozilla::hal;
-using namespace mozilla::services;
-
-class nsSystemTimeChangeObserver : public SystemClockChangeObserver,
-                                   public SystemTimezoneChangeObserver
-{
-  typedef nsTObserverArray<nsWeakPtr> ListenerArray;
-public:
-  static nsSystemTimeChangeObserver* GetInstance();
-  virtual ~nsSystemTimeChangeObserver();
-
-  // Implementing hal::SystemClockChangeObserver::Notify()
-  void Notify(const int64_t& aClockDeltaMS) override;
-
-  // Implementing hal::SystemTimezoneChangeObserver::Notify()
-  void Notify(
-    const mozilla::hal::SystemTimezoneChangeInformation& aSystemTimezoneChangeInfo) override;
-
-  nsresult AddWindowListenerImpl(nsPIDOMWindowInner* aWindow);
-  nsresult RemoveWindowListenerImpl(nsPIDOMWindowInner* aWindow);
-
-private:
-  nsSystemTimeChangeObserver() { };
-  ListenerArray mWindowListeners;
-  void FireMozTimeChangeEvent();
-};
-
-StaticAutoPtr<nsSystemTimeChangeObserver> sObserver;
-
-nsSystemTimeChangeObserver* nsSystemTimeChangeObserver::GetInstance()
-{
-  if (!sObserver) {
-    sObserver = new nsSystemTimeChangeObserver();
-    ClearOnShutdown(&sObserver);
-  }
-  return sObserver;
-}
-
-nsSystemTimeChangeObserver::~nsSystemTimeChangeObserver()
-{
-  UnregisterSystemClockChangeObserver(this);
-  UnregisterSystemTimezoneChangeObserver(this);
-}
-
-void
-nsSystemTimeChangeObserver::FireMozTimeChangeEvent()
-{
-  ListenerArray::ForwardIterator iter(mWindowListeners);
-  while (iter.HasMore()) {
-    nsWeakPtr weakWindow = iter.GetNext();
-    nsCOMPtr<nsPIDOMWindowInner> innerWindow = do_QueryReferent(weakWindow);
-    nsCOMPtr<nsPIDOMWindowOuter> outerWindow;
-    nsCOMPtr<nsIDocument> document;
-    if (!innerWindow ||
-        !(document = innerWindow->GetExtantDoc()) ||
-        !(outerWindow = innerWindow->GetOuterWindow())) {
-      mWindowListeners.RemoveElement(weakWindow);
-      continue;
-    }
-
-    nsContentUtils::DispatchTrustedEvent(document, outerWindow,
-      NS_LITERAL_STRING("moztimechange"), /* bubbles = */ true,
-      /* canceable = */ false);
-  }
-}
-
-void
-nsSystemTimeChangeObserver::Notify(const int64_t& aClockDeltaMS)
-{
-  // Notify observers that the system clock has been adjusted.
-  nsCOMPtr<nsIObserverService> observerService = GetObserverService();
-  if (observerService) {
-    nsString dataStr;
-    dataStr.AppendFloat(static_cast<double>(aClockDeltaMS));
-    observerService->NotifyObservers(
-      nullptr, "system-clock-change", dataStr.get());
-  }
-
-  FireMozTimeChangeEvent();
-}
-
-void
-nsSystemTimeChangeObserver::Notify(
-  const SystemTimezoneChangeInformation& aSystemTimezoneChangeInfo)
-{
-  FireMozTimeChangeEvent();
-}
-
-nsresult
-mozilla::time::AddWindowListener(nsPIDOMWindowInner* aWindow)
-{
-  return nsSystemTimeChangeObserver::GetInstance()->AddWindowListenerImpl(aWindow);
-}
-
-nsresult
-nsSystemTimeChangeObserver::AddWindowListenerImpl(nsPIDOMWindowInner* aWindow)
-{
-  if (!aWindow) {
-    return NS_ERROR_ILLEGAL_VALUE;
-  }
-
-  nsWeakPtr windowWeakRef = do_GetWeakReference(aWindow);
-  NS_ASSERTION(windowWeakRef, "nsIDOMWindow implementations shuld support weak ref");
-
-  if (mWindowListeners.IndexOf(windowWeakRef) !=
-      ListenerArray::array_type::NoIndex) {
-    return NS_OK;
-  }
-
-  if (mWindowListeners.IsEmpty()) {
-    RegisterSystemClockChangeObserver(sObserver);
-    RegisterSystemTimezoneChangeObserver(sObserver);
-  }
-
-  mWindowListeners.AppendElement(windowWeakRef);
-  return NS_OK;
-}
-
-nsresult
-mozilla::time::RemoveWindowListener(nsPIDOMWindowInner* aWindow)
-{
-  if (!sObserver) {
-    return NS_OK;
-  }
-
-  return nsSystemTimeChangeObserver::GetInstance()->RemoveWindowListenerImpl(aWindow);
-}
-
-nsresult
-nsSystemTimeChangeObserver::RemoveWindowListenerImpl(nsPIDOMWindowInner* aWindow)
-{
-  if (!aWindow) {
-    return NS_OK;
-  }
-
-  nsWeakPtr windowWeakRef = do_GetWeakReference(aWindow);
-  mWindowListeners.RemoveElement(windowWeakRef);
-
-  if (mWindowListeners.IsEmpty()) {
-    UnregisterSystemClockChangeObserver(sObserver);
-    UnregisterSystemTimezoneChangeObserver(sObserver);
-  }
-
-  return NS_OK;
-}
deleted file mode 100644
--- a/dom/time/TimeChangeObserver.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 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/. */
-
-#ifndef _mozilla_time_change_observer_h_
-#define _mozilla_time_change_observer_h_
-
-#include "nscore.h"
-
-class nsPIDOMWindowInner;
-
-namespace mozilla {
-namespace time {
-
-nsresult AddWindowListener(nsPIDOMWindowInner* aWindow);
-nsresult RemoveWindowListener(nsPIDOMWindowInner* aWindow);
-
-} // namespace time
-} // namespace mozilla
-
-#endif //_mozilla_time_change_observer_h_
deleted file mode 100644
--- a/dom/time/TimeManager.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 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 "TimeManager.h"
-
-#include "mozilla/dom/Date.h"
-#include "mozilla/dom/MozTimeManagerBinding.h"
-#include "nsITimeService.h"
-#include "nsServiceManagerUtils.h"
-
-namespace mozilla {
-namespace dom {
-namespace time {
-
-NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(TimeManager)
-  NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
-  NS_INTERFACE_MAP_ENTRY(nsISupports)
-NS_INTERFACE_MAP_END
-
-NS_IMPL_CYCLE_COLLECTING_ADDREF(TimeManager)
-NS_IMPL_CYCLE_COLLECTING_RELEASE(TimeManager)
-
-NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(TimeManager, mWindow)
-
-JSObject*
-TimeManager::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
-{
-  return MozTimeManagerBinding::Wrap(aCx, this, aGivenProto);
-}
-
-void
-TimeManager::Set(Date& aDate)
-{
-  Set(aDate.ToDouble());
-}
-
-void
-TimeManager::Set(double aTime)
-{
-  nsCOMPtr<nsITimeService> timeService = do_GetService(TIMESERVICE_CONTRACTID);
-  if (timeService) {
-    timeService->Set(aTime);
-  }
-}
-
-} // namespace time
-} // namespace dom
-} // namespace mozilla
deleted file mode 100644
--- a/dom/time/TimeManager.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 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/. */
-
-#ifndef mozilla_dom_time_TimeManager_h
-#define mozilla_dom_time_TimeManager_h
-
-#include "mozilla/Attributes.h"
-#include "nsISupports.h"
-#include "nsPIDOMWindow.h"
-#include "nsWrapperCache.h"
-
-namespace mozilla {
-namespace dom {
-
-class Date;
-
-namespace time {
-
-class TimeManager final : public nsISupports
-                        , public nsWrapperCache
-{
-public:
-  static bool PrefEnabled(JSContext* aCx, JSObject* aGlobal)
-  {
-#ifdef MOZ_TIME_MANAGER
-    return true;
-#else
-    return false;
-#endif
-  }
-
-  NS_DECL_CYCLE_COLLECTING_ISUPPORTS
-  NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(TimeManager)
-
-  explicit TimeManager(nsPIDOMWindowInner* aWindow)
-    : mWindow(aWindow)
-  {
-  }
-
-  nsPIDOMWindowInner* GetParentObject() const
-  {
-    return mWindow;
-  }
-  virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
-
-  void Set(Date& aDate);
-  void Set(double aTime);
-
-private:
-  ~TimeManager() {}
-
-  nsCOMPtr<nsPIDOMWindowInner> mWindow;
-};
-
-} // namespace time
-} // namespace dom
-} // namespace mozilla
-
-#endif //mozilla_dom_time_TimeManager_h
deleted file mode 100644
--- a/dom/time/TimeService.cpp
+++ /dev/null
@@ -1,40 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 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 "base/basictypes.h"
-#include "jsapi.h"
-#include "mozilla/ClearOnShutdown.h"
-#include "mozilla/Hal.h"
-#include "TimeService.h"
-
-namespace mozilla {
-namespace dom {
-namespace time {
-
-NS_IMPL_ISUPPORTS(TimeService, nsITimeService)
-
-/* static */ StaticRefPtr<TimeService> TimeService::sSingleton;
-
-/* static */ already_AddRefed<TimeService>
-TimeService::GetInstance()
-{
-  if (!sSingleton) {
-    sSingleton = new TimeService();
-    ClearOnShutdown(&sSingleton);
-  }
-  RefPtr<TimeService> service = sSingleton.get();
-  return service.forget();
-}
-
-NS_IMETHODIMP
-TimeService::Set(int64_t aTimeInMS) {
-  hal::AdjustSystemClock(aTimeInMS - (JS_Now() / PR_USEC_PER_MSEC));
-  return NS_OK;
-}
-
-} // namespace time
-} // namespace dom
-} // namespace mozilla
deleted file mode 100644
--- a/dom/time/TimeService.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 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/. */
-
-#ifndef mozilla_dom_time_TimeService_h
-#define mozilla_dom_time_TimeService_h
-
-#include "mozilla/StaticPtr.h"
-#include "nsITimeService.h"
-
-namespace mozilla {
-namespace dom {
-namespace time {
-
-/**
- * This class implements a service which lets us modify the system clock time.
- */
-class TimeService : public nsITimeService
-{
-public:
-  NS_DECL_ISUPPORTS
-  NS_DECL_NSITIMESERVICE
-
-  static already_AddRefed<TimeService> GetInstance();
-
-private:
-  virtual ~TimeService() {};
-
-  static StaticRefPtr<TimeService> sSingleton;
-};
-
-} // namespace time
-} // namespace dom
-} // namespace mozilla
-
-#endif //mozilla_dom_time_TimeService_h
deleted file mode 100644
--- a/dom/time/moz.build
+++ /dev/null
@@ -1,32 +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/.
-
-with Files("**"):
-    BUG_COMPONENT = ("Core", "DOM: Device Interfaces")
-
-XPIDL_SOURCES += [
-    'nsITimeService.idl',
-]
-
-XPIDL_MODULE = 'dom_time'
-
-EXPORTS.mozilla.dom.time += [
-    'DateCacheCleaner.h',
-    'TimeChangeObserver.h',
-    'TimeManager.h',
-    'TimeService.h',
-]
-
-UNIFIED_SOURCES += [
-    'DateCacheCleaner.cpp',
-    'TimeChangeObserver.cpp',
-    'TimeManager.cpp',
-    'TimeService.cpp',
-]
-
-include('/ipc/chromium/chromium-config.mozbuild')
-
-FINAL_LIBRARY = 'xul'
deleted file mode 100644
--- a/dom/time/nsITimeService.idl
+++ /dev/null
@@ -1,20 +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 "nsISupports.idl"
-
-%{C++
-#define NS_TIMESERVICE_CID { 0x80d6f9cc, 0xf16d, 0x40c3, { 0xa5, 0x2e, 0xc4, 0xe6, 0x56, 0xe3, 0x65, 0xb4 } }
-#define TIMESERVICE_CONTRACTID "@mozilla.org/time/timeservice;1"
-%}
-
-[scriptable, builtinclass, uuid(1fc7fde2-0090-11e2-bdd6-0fea4b9f41f8)]
-interface nsITimeService : nsISupports
-{
-  /* Set the system time.
-   *
-   * The |aTimeInMS| argument is the time in milliseconds since the epoch.
-   */
-  void set(in int64_t aTimeInMS);
-};
deleted file mode 100644
--- a/dom/webidl/MozTimeManager.webidl
+++ /dev/null
@@ -1,18 +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/. */
-
-[Func="mozilla::dom::time::TimeManager::PrefEnabled"]
-interface MozTimeManager {
-  /* Set the system time.
-   *
-   * The |time| argument can be either a Date object or a number.
-   *
-   * - If |time| is a number, it's interpreted as milliseconds
-   *   since the epoch (midnight UTC on January 1, 1970).
-   * - If |time| is a Date object, |set(time)| is equivalent to
-   *   |set(time.getTime())|.
-   */
-  void set(Date time);
-  void set(double time);
-};
--- a/dom/webidl/Navigator.webidl
+++ b/dom/webidl/Navigator.webidl
@@ -229,24 +229,16 @@ partial interface Navigator {
   [ChromeOnly, Pref="dom.vr.enabled"]
   void requestVRPresentation(VRDisplay display);
 };
 partial interface Navigator {
   [Pref="dom.vr.test.enabled"]
   VRServiceTest requestVRServiceTest();
 };
 
-#ifdef MOZ_TIME_MANAGER
-// nsIDOMMozNavigatorTime
-partial interface Navigator {
-  [Throws, ChromeOnly]
-  readonly attribute MozTimeManager mozTime;
-};
-#endif // MOZ_TIME_MANAGER
-
 callback NavigatorUserMediaSuccessCallback = void (MediaStream stream);
 callback NavigatorUserMediaErrorCallback = void (MediaStreamError error);
 
 partial interface Navigator {
   [Throws, Func="Navigator::HasUserMediaSupport"]
   readonly attribute MediaDevices mediaDevices;
 
   // Deprecated. Use mediaDevices.getUserMedia instead.
--- a/dom/webidl/moz.build
+++ b/dom/webidl/moz.build
@@ -206,19 +206,16 @@ with Files("*Record*"):
     BUG_COMPONENT = ("Core", "Audio/Video: Recording")
 
 with Files("Media*Track*"):
     BUG_COMPONENT = ("Core", "WebRTC: Audio/Video")
 
 with Files("Mouse*"):
     BUG_COMPONENT = ("Core", "DOM: Events")
 
-with Files("MozTimeManager.webidl"):
-    BUG_COMPONENT = ("Core", "DOM: Device Interfaces")
-
 with Files("MutationEvent.webidl"):
     BUG_COMPONENT = ("Core", "DOM: Events")
 
 with Files("NativeOSFileInternals.webidl"):
     BUG_COMPONENT = ("Toolkit", "OS.File")
 
 with Files("Net*"):
     BUG_COMPONENT = ("Core", "Networking")
@@ -359,17 +356,16 @@ with Files("Worker*"):
     BUG_COMPONENT = ("Core", "DOM: Workers")
 
 GENERATED_WEBIDL_FILES = [
     'CSS2Properties.webidl',
 ]
 
 PREPROCESSED_WEBIDL_FILES = [
     'ChromeUtils.webidl',
-    'Navigator.webidl',
     'Node.webidl',
     'Window.webidl',
 ]
 
 WEBIDL_FILES = [
     'AbortController.webidl',
     'AbortSignal.webidl',
     'AbstractWorker.webidl',
@@ -685,21 +681,21 @@ WEBIDL_FILES = [
     'MessagePort.webidl',
     'MimeType.webidl',
     'MimeTypeArray.webidl',
     'MouseEvent.webidl',
     'MouseScrollEvent.webidl',
     'MozStorageAsyncStatementParams.webidl',
     'MozStorageStatementParams.webidl',
     'MozStorageStatementRow.webidl',
-    'MozTimeManager.webidl',
     'MutationEvent.webidl',
     'MutationObserver.webidl',
     'NamedNodeMap.webidl',
     'NativeOSFileInternals.webidl',
+    'Navigator.webidl',
     'NetDashboard.webidl',
     'NetworkInformation.webidl',
     'NetworkOptions.webidl',
     'NodeFilter.webidl',
     'NodeIterator.webidl',
     'NodeList.webidl',
     'Notification.webidl',
     'NotificationEvent.webidl',
--- a/layout/build/nsLayoutModule.cpp
+++ b/layout/build/nsLayoutModule.cpp
@@ -158,17 +158,16 @@ static void Shutdown();
 #include "nsIPowerManagerService.h"
 #include "nsIMediaManager.h"
 #include "mozilla/dom/nsMixedContentBlocker.h"
 
 #include "AudioChannelService.h"
 #include "mozilla/net/WebSocketEventService.h"
 
 #include "mozilla/dom/power/PowerManagerService.h"
-#include "mozilla/dom/time/TimeService.h"
 
 #include "nsIPresentationService.h"
 
 #include "MediaManager.h"
 
 #include "GMPService.h"
 
 #include "mozilla/dom/PresentationDeviceManager.h"
@@ -179,17 +178,16 @@ static void Shutdown();
 #include "mozilla/TextInputProcessor.h"
 
 using namespace mozilla;
 using namespace mozilla::dom;
 using mozilla::dom::power::PowerManagerService;
 using mozilla::dom::quota::QuotaManagerService;
 using mozilla::dom::workers::WorkerDebuggerManager;
 using mozilla::dom::UDPSocketChild;
-using mozilla::dom::time::TimeService;
 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 \
@@ -255,18 +253,16 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(AudioChan
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsDeviceSensors)
 
 #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(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)
@@ -643,17 +639,16 @@ NS_DEFINE_NAMED_CID(THIRDPARTYUTIL_CID);
 NS_DEFINE_NAMED_CID(NS_STRUCTUREDCLONECONTAINER_CID);
 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_MEDIAMANAGERSERVICE_CID);
 #ifdef MOZ_WEBSPEECH_TEST_BACKEND
 NS_DEFINE_NAMED_CID(NS_FAKE_SPEECH_RECOGNITION_SERVICE_CID);
 #endif
 #ifdef MOZ_WEBSPEECH
 NS_DEFINE_NAMED_CID(NS_SYNTHVOICEREGISTRY_CID);
 #endif
 
@@ -904,17 +899,16 @@ static const mozilla::Module::CIDEntry k
   { &kNS_HAPTICFEEDBACK_CID, false, nullptr, nsHapticFeedbackConstructor },
 #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_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 },
@@ -1023,17 +1017,16 @@ static const mozilla::Module::ContractID
 #if defined(ANDROID)
   { "@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 },
   { 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 },
--- a/layout/build/nsLayoutStatics.cpp
+++ b/layout/build/nsLayoutStatics.cpp
@@ -101,17 +101,16 @@
 #include "nsHyphenationManager.h"
 #include "nsWindowMemoryReporter.h"
 #include "mozilla/dom/ContentParent.h"
 #include "mozilla/ProcessPriorityManager.h"
 #include "nsPermissionManager.h"
 #include "nsCookieService.h"
 #include "nsApplicationCacheService.h"
 #include "mozilla/dom/CustomElementRegistry.h"
-#include "mozilla/dom/time/DateCacheCleaner.h"
 #include "mozilla/EventDispatcher.h"
 #include "mozilla/IMEStateManager.h"
 #include "mozilla/dom/HTMLVideoElement.h"
 #include "TouchManager.h"
 #include "DecoderDoctorLogger.h"
 #include "MediaDecoder.h"
 #include "MediaPrefs.h"
 #include "mozilla/ServoBindings.h"