Bug 1330359 - Fix building with -Werror for non-SPS platforms. r=mstange
authorJan Beich <jbeich@FreeBSD.org>
Wed, 11 Jan 2017 17:22:19 +0000
changeset 374904 2cb610bc9eb2a868fa389e8070cd7fbb914e5b88
parent 374903 66046ad80298b40ed50553f9ba2efd97e858e86a
child 374905 92b0af77c610afcfc293320807a44f7dbdc15d4d
push id6996
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 20:48:21 +0000
treeherdermozilla-beta@d89512dab048 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmstange
bugs1330359
milestone53.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 1330359 - Fix building with -Werror for non-SPS platforms. r=mstange MozReview-Commit-ID: Ifb3zyGHn7U
layout/base/PresShell.cpp
storage/TelemetryVFS.cpp
--- a/layout/base/PresShell.cpp
+++ b/layout/base/PresShell.cpp
@@ -9030,20 +9030,22 @@ PresShell::DoReflow(nsIFrame* target, bo
 
   target->SchedulePaint();
   nsIFrame *parent = nsLayoutUtils::GetCrossDocParentFrame(target);
   while (parent) {
     nsSVGEffects::InvalidateDirectRenderingObservers(parent);
     parent = nsLayoutUtils::GetCrossDocParentFrame(parent);
   }
 
+#ifdef MOZ_ENABLE_PROFILER_SPS
   nsIURI *uri = mDocument->GetDocumentURI();
   PROFILER_LABEL_PRINTF("PresShell", "DoReflow",
     js::ProfileEntry::Category::GRAPHICS, "(%s)",
     uri ? uri->GetSpecOrDefault().get() : "N/A");
+#endif
 
   nsDocShell* docShell = static_cast<nsDocShell*>(GetPresContext()->GetDocShell());
   RefPtr<TimelineConsumers> timelines = TimelineConsumers::Get();
   bool isTimelineRecording = timelines && timelines->HasConsumer(docShell);
 
   if (isTimelineRecording) {
     timelines->AddMarkerForDocShell(docShell, "Reflow", MarkerTracingType::START);
   }
--- a/storage/TelemetryVFS.cpp
+++ b/storage/TelemetryVFS.cpp
@@ -76,31 +76,35 @@ public:
    *
    * @param aOp optionally takes an IO operation to report through the
    * IOInterposer. Filename will be reported as NULL, and reference will be
    * either "sqlite-mainthread" or "sqlite-otherthread".
    */
   explicit IOThreadAutoTimer(Telemetry::ID aId,
     IOInterposeObserver::Operation aOp = IOInterposeObserver::OpNone)
     : start(TimeStamp::Now()),
-      id(aId),
-      op(aOp)
+      id(aId)
+#if defined(MOZ_ENABLE_PROFILER_SPS) && !defined(XP_WIN)
+      , op(aOp)
+#endif
   {
   }
 
   /**
    * This constructor is for when we want to report an operation to
    * IOInterposer but do not require a telemetry probe.
    *
    * @param aOp IO Operation to report through the IOInterposer.
    */
   explicit IOThreadAutoTimer(IOInterposeObserver::Operation aOp)
     : start(TimeStamp::Now()),
-      id(Telemetry::HistogramCount),
-      op(aOp)
+      id(Telemetry::HistogramCount)
+#if defined(MOZ_ENABLE_PROFILER_SPS) && !defined(XP_WIN)
+      , op(aOp)
+#endif
   {
   }
 
   ~IOThreadAutoTimer()
   {
     TimeStamp end(TimeStamp::Now());
     uint32_t mainThread = NS_IsMainThread() ? 1 : 0;
     if (id != Telemetry::HistogramCount) {
@@ -122,17 +126,19 @@ public:
       IOInterposer::Report(ob);
     }
 #endif /* defined(MOZ_ENABLE_PROFILER_SPS) && !defined(XP_WIN) */
   }
 
 private:
   const TimeStamp start;
   const Telemetry::ID id;
+#if defined(MOZ_ENABLE_PROFILER_SPS) && !defined(XP_WIN)
   IOInterposeObserver::Operation op;
+#endif
 };
 
 struct telemetry_file {
   // Base class.  Must be first
   sqlite3_file base;
 
   // histograms pertaining to this file
   Histograms *histograms;