Bug 1330119 - Fix -Werror for non-SPS platforms, required by MOZ_AUTOMATION. r?mstange
MozReview-Commit-ID: Ifb3zyGHn7U
--- a/layout/base/PresShell.cpp
+++ b/layout/base/PresShell.cpp
@@ -9016,20 +9016,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;