Backout changeset 9f16bba541cc (bug 790499) becasuse of build bustage
authorEhsan Akhgari <ehsan@mozilla.com>
Fri, 21 Sep 2012 15:57:42 -0400
changeset 107740 57deb0de3513bef09fe1ba67dfc45be84b666419
parent 107739 cbac99ae6a9968cac044699e8aa3bc3cc32c3f16
child 107741 94111544f20110014fcd56d0011db26b49cf53f6
push id15196
push usereakhgari@mozilla.com
push dateFri, 21 Sep 2012 19:57:55 +0000
treeherdermozilla-inbound@57deb0de3513 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs790499
milestone18.0a1
backs out9f16bba541ccf679095fd63543011256e7279de7
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
Backout changeset 9f16bba541cc (bug 790499) becasuse of build bustage
dom/time/DateCacheCleaner.cpp
dom/time/DateCacheCleaner.h
dom/time/Makefile.in
hal/HalTypes.h
layout/build/nsLayoutStatics.cpp
deleted file mode 100644
--- a/dom/time/DateCacheCleaner.cpp
+++ /dev/null
@@ -1,62 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* 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 "mozilla/Hal.h"
-#include "mozilla/ClearOnShutdown.h"
-#include "DateCacheCleaner.h"
-
-#include "nsIJSContextStack.h"
-#include "mozilla/StaticPtr.h"
-
-using namespace mozilla::hal;
-
-namespace mozilla {
-namespace time {
-
-class DateCacheCleaner : public SystemTimeChangeObserver
-{
-public:
-  DateCacheCleaner()
-  {
-    RegisterSystemTimeChangeObserver(this);
-  }
-
-  ~DateCacheCleaner()
-  {
-    UnregisterSystemTimeChangeObserver(this);
-  }
-
-  virtual void Notify(const SystemTimeChange& aReason)
-  {
-    if (aReason == SYS_TIME_CHANGE_CLOCK) {
-      return;
-    }
-
-    nsCOMPtr<nsIThreadJSContextStack> stack =
-      do_GetService("@mozilla.org/js/xpc/ContextStack;1");
-    if (!stack) {
-      NS_WARNING("Failed to get JSContextStack");
-    }
-    JSContext *cx = stack->GetSafeJSContext();
-    if (!cx) {
-      NS_WARNING("Failed to GetSafeJSContext");
-    }
-    JS_ClearDateCaches(cx);
-  }
-};
-
-StaticAutoPtr<DateCacheCleaner> sDateCacheCleaner;
-
-void
-InitializeDateCacheCleaner()
-{
-  if (!sDateCacheCleaner) {
-    sDateCacheCleaner = new DateCacheCleaner();
-    ClearOnShutdown(&sDateCacheCleaner);
-  }
-}
-
-} // namespace time
-} // namespace mozilla
deleted file mode 100644
--- a/dom/time/DateCacheCleaner.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* 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_ClearDateCaches to update the time zone information.
- */
-
-namespace mozilla {
-namespace time {
-void InitializeDateCacheCleaner();
-} //namespace time
-} //namespace mozilla
--- a/dom/time/Makefile.in
+++ b/dom/time/Makefile.in
@@ -15,22 +15,20 @@ LIBXUL_LIBRARY   = 1
 FORCE_STATIC_LIB = 1
 FAIL_ON_WARNINGS := 1
 
 include $(topsrcdir)/dom/dom-config.mk
 
 CPPSRCS = \
   TimeManager.cpp \
   TimeChangeObserver.cpp \
-  DateCacheCleaner.cpp \
   $(NULL)
 
 EXPORTS = \
   TimeChangeObserver.h \
-  DateCacheCleaner.h \
   $(NULL)
 
 XPIDLSRCS = \
   nsIDOMNavigatorTime.idl \
   nsIDOMTimeManager.idl \
   $(NULL)
 
 include $(topsrcdir)/config/config.mk
--- a/hal/HalTypes.h
+++ b/hal/HalTypes.h
@@ -76,17 +76,16 @@ enum WakeLockControl {
 
 enum SystemTimeChange {
   SYS_TIME_CHANGE_UNKNOWN = -1,
   SYS_TIME_CHANGE_CLOCK,
   SYS_TIME_CHANGE_TZ,
   SYS_TIME_CHANGE_GUARD
 };
 
-typedef Observer<SystemTimeChange> SystemTimeChangeObserver;
 } // namespace hal
 } // namespace mozilla
 
 namespace IPC {
 
 /**
  * Light type serializer.
  */
--- a/layout/build/nsLayoutStatics.cpp
+++ b/layout/build/nsLayoutStatics.cpp
@@ -95,24 +95,22 @@
 #include "nsRefreshDriver.h"
 #include "nsDOMMutationObserver.h"
 #include "nsHyphenationManager.h"
 #include "nsEditorSpellCheck.h"
 #include "nsWindowMemoryReporter.h"
 #include "mozilla/dom/ContentParent.h"
 #include "mozilla/dom/ipc/ProcessPriorityManager.h"
 #include "nsPermissionManager.h"
-#include "DateCacheCleaner.h"
 
 extern void NS_ShutdownChainItemPool();
 
 using namespace mozilla;
 using namespace mozilla::dom;
 using namespace mozilla::dom::ipc;
-using namespace mozilla::time;
 
 nsrefcnt nsLayoutStatics::sLayoutStaticRefcnt = 0;
 
 nsresult
 nsLayoutStatics::Initialize()
 {
   NS_ASSERTION(sLayoutStaticRefcnt == 0,
                "nsLayoutStatics isn't zero!");
@@ -255,18 +253,16 @@ nsLayoutStatics::Initialize()
   nsSVGUtils::Init();
 
   InitProcessPriorityManager();
 
   nsPermissionManager::AppUninstallObserverInit();
 
   nsDOMStorageBaseDB::Init();
 
-  InitializeDateCacheCleaner();
-
   return NS_OK;
 }
 
 void
 nsLayoutStatics::Shutdown()
 {
   // Don't need to shutdown nsWindowMemoryReporter, that will be done by the
   // memory reporter manager.