Bug 1279608: Move nsBaseWidget.cpp's PRTimeToSeconds and kAccessibilityLastRunDatePref definitions inside the same #ifdef guard where their usages are. r=jimm
authorDaniel Holbert <dholbert@cs.stanford.edu>
Fri, 10 Jun 2016 13:04:31 -0700
changeset 302096 eb5d01073c323309c379f37baa434207da0e1611
parent 302095 eb036505334d2779b093a943d3a0d033fce11848
child 302097 d4f903cba94d921ccf99931961d823f53389399c
push id78587
push userdholbert@mozilla.com
push dateMon, 20 Jun 2016 14:32:16 +0000
treeherdermozilla-inbound@eb5d01073c32 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjimm
bugs1279608
milestone50.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 1279608: Move nsBaseWidget.cpp's PRTimeToSeconds and kAccessibilityLastRunDatePref definitions inside the same #ifdef guard where their usages are. r=jimm MozReview-Commit-ID: 5RAdy4RCDOQ
widget/nsBaseWidget.cpp
--- a/widget/nsBaseWidget.cpp
+++ b/widget/nsBaseWidget.cpp
@@ -237,28 +237,16 @@ WidgetShutdownObserver::Unregister()
 {
   if (mRegistered) {
     mWidget = nullptr;
     nsContentUtils::UnregisterShutdownObserver(this);
     mRegistered = false;
   }
 }
 
-#if defined(XP_WIN) || defined(XP_MACOSX) || defined(MOZ_WIDGET_GTK)
-// defined in nsAppRunner.cpp
-extern const char* kAccessibilityLastRunDatePref;
-
-static inline uint32_t
-PRTimeToSeconds(PRTime t_usec)
-{
-  PRTime usec_per_sec = PR_USEC_PER_SEC;
-  return uint32_t(t_usec /= usec_per_sec);
-}
-#endif
-
 void
 nsBaseWidget::Shutdown()
 {
   DestroyCompositor();
   FreeShutdownObserver();
 #if defined(XP_WIN) || defined(MOZ_WIDGET_GTK)
   if (sPluginWidgetList) {
     delete sPluginWidgetList;
@@ -1881,16 +1869,28 @@ nsBaseWidget::ZoomToRect(const uint32_t&
     return;
   }
   uint64_t layerId = mCompositorSession->RootLayerTreeId();
   mAPZC->ZoomToRect(ScrollableLayerGuid(layerId, aPresShellId, aViewId), aRect, aFlags);
 }
 
 #ifdef ACCESSIBILITY
 
+#if defined(XP_WIN) || defined(XP_MACOSX) || defined(MOZ_WIDGET_GTK)
+// defined in nsAppRunner.cpp
+extern const char* kAccessibilityLastRunDatePref;
+
+static inline uint32_t
+PRTimeToSeconds(PRTime t_usec)
+{
+  PRTime usec_per_sec = PR_USEC_PER_SEC;
+  return uint32_t(t_usec /= usec_per_sec);
+}
+#endif
+
 a11y::Accessible*
 nsBaseWidget::GetRootAccessible()
 {
   NS_ENSURE_TRUE(mWidgetListener, nullptr);
 
   nsIPresShell* presShell = mWidgetListener->GetPresShell();
   NS_ENSURE_TRUE(presShell, nullptr);