From 0fd6f34ed376775aaa88f460bd5ae38222ee695d Mon Sep 17 00:00:00 2001 From: Ryan VanderMeulen Date: Thu, 5 Feb 2015 14:36:25 -0500 Subject: [PATCH] Backed out changeset 39f991c2bd71 (bug 1115130) for Werror bustage. CLOSED TREE --- dom/base/nsContentUtils.cpp | 4 ---- dom/base/nsContentUtils.h | 9 --------- dom/base/nsPerformance.cpp | 30 ++++-------------------------- dom/base/nsPerformance.h | 2 +- modules/libpref/init/all.js | 3 --- 5 files changed, 5 insertions(+), 43 deletions(-) diff --git a/dom/base/nsContentUtils.cpp b/dom/base/nsContentUtils.cpp index ddb3c126d4d..5f7485a44d4 100644 --- a/dom/base/nsContentUtils.cpp +++ b/dom/base/nsContentUtils.cpp @@ -242,7 +242,6 @@ bool nsContentUtils::sTrustedFullScreenOnly = true; bool nsContentUtils::sFullscreenApiIsContentOnly = false; bool nsContentUtils::sIsPerformanceTimingEnabled = false; bool nsContentUtils::sIsResourceTimingEnabled = false; -bool nsContentUtils::sIsUserTimingLoggingEnabled = false; bool nsContentUtils::sIsExperimentalAutocompleteEnabled = false; bool nsContentUtils::sEncodeDecodeURLHash = false; @@ -516,9 +515,6 @@ nsContentUtils::Init() Preferences::AddBoolVarCache(&sIsResourceTimingEnabled, "dom.enable_resource_timing", true); - Preferences::AddBoolVarCache(&sIsUserTimingLoggingEnabled, - "dom.performance.enable_user_timing_logging", false); - Preferences::AddBoolVarCache(&sIsExperimentalAutocompleteEnabled, "dom.forms.autocomplete.experimental", false); diff --git a/dom/base/nsContentUtils.h b/dom/base/nsContentUtils.h index d645f97ed6e..56bae27bd8d 100644 --- a/dom/base/nsContentUtils.h +++ b/dom/base/nsContentUtils.h @@ -1897,14 +1897,6 @@ public: return sIsPerformanceTimingEnabled; } - /* - * Returns true if user timing API should print to console. - */ - static bool IsUserTimingLoggingEnabled() - { - return sIsUserTimingLoggingEnabled; - } - /* * Returns true if the performance timing APIs are enabled. */ @@ -2385,7 +2377,6 @@ private: static uint32_t sHandlingInputTimeout; static bool sIsPerformanceTimingEnabled; static bool sIsResourceTimingEnabled; - static bool sIsUserTimingLoggingEnabled; static bool sIsExperimentalAutocompleteEnabled; static bool sEncodeDecodeURLHash; diff --git a/dom/base/nsPerformance.cpp b/dom/base/nsPerformance.cpp index b40af66a9e9..57f005cad5b 100644 --- a/dom/base/nsPerformance.cpp +++ b/dom/base/nsPerformance.cpp @@ -24,12 +24,6 @@ #include "mozilla/dom/PerformanceNavigationBinding.h" #include "mozilla/TimeStamp.h" -#ifdef MOZ_WIDGET_GONK -#define PERFLOG(msg, args...) __android_log_print(ANDROID_LOG_INFO, "PerformanceTiming", msg, ## args) -#else -#define PERFLOG(msg, args...) printf_stderr(msg, ## args) -#endif - using namespace mozilla; using namespace mozilla::dom; @@ -595,7 +589,7 @@ nsPerformance::AddEntry(nsIHttpChannel* channel, initiatorType = NS_LITERAL_STRING("other"); } performanceEntry->SetInitiatorType(initiatorType); - InsertPerformanceEntry(performanceEntry, false); + InsertPerformanceEntry(performanceEntry); } } @@ -620,8 +614,7 @@ nsPerformance::PerformanceEntryComparator::LessThan( } void -nsPerformance::InsertPerformanceEntry(PerformanceEntry* aEntry, - bool aShouldPrint) +nsPerformance::InsertPerformanceEntry(PerformanceEntry* aEntry) { MOZ_ASSERT(aEntry); MOZ_ASSERT(mEntries.Length() < mPrimaryBufferSize); @@ -629,21 +622,6 @@ nsPerformance::InsertPerformanceEntry(PerformanceEntry* aEntry, NS_WARNING("Performance Entry buffer size maximum reached!"); return; } - if (aShouldPrint && nsContentUtils::IsUserTimingLoggingEnabled()) { - nsAutoCString uri; - nsresult rv = mWindow->GetDocumentURI()->GetHost(uri); - if(NS_FAILED(rv)) { - // If we have no URI, just put in "none". - uri.AssignLiteral("none"); - } - PERFLOG("Performance Entry: %s|%s|%s|%f|%f|%lld\n", - uri.get(), - NS_ConvertUTF16toUTF8(aEntry->GetEntryType()).get(), - NS_ConvertUTF16toUTF8(aEntry->GetName()).get(), - aEntry->StartTime(), - aEntry->Duration(), - static_cast(PR_Now() / PR_USEC_PER_MSEC)); - } mEntries.InsertElementSorted(aEntry, PerformanceEntryComparator()); if (mEntries.Length() == mPrimaryBufferSize) { @@ -667,7 +645,7 @@ nsPerformance::Mark(const nsAString& aName, ErrorResult& aRv) } nsRefPtr performanceMark = new PerformanceMark(this, aName); - InsertPerformanceEntry(performanceMark, true); + InsertPerformanceEntry(performanceMark); } void @@ -744,7 +722,7 @@ nsPerformance::Measure(const nsAString& aName, } nsRefPtr performanceMeasure = new PerformanceMeasure(this, aName, startTime, endTime); - InsertPerformanceEntry(performanceMeasure, true); + InsertPerformanceEntry(performanceMeasure); } void diff --git a/dom/base/nsPerformance.h b/dom/base/nsPerformance.h index 4d79b9e2732..22b01538e35 100644 --- a/dom/base/nsPerformance.h +++ b/dom/base/nsPerformance.h @@ -353,7 +353,7 @@ private: DOMTimeMilliSec GetPerformanceTimingFromString(const nsAString& aTimingName); DOMHighResTimeStamp ConvertDOMMilliSecToHighRes(const DOMTimeMilliSec aTime); void DispatchBufferFullEvent(); - void InsertPerformanceEntry(PerformanceEntry* aEntry, bool aShouldPrint); + void InsertPerformanceEntry(PerformanceEntry* aEntry); void ClearEntries(const mozilla::dom::Optional& aEntryName, const nsAString& aEntryType); nsCOMPtr mWindow; diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js index bc4a7388f94..440ea445fa7 100644 --- a/modules/libpref/init/all.js +++ b/modules/libpref/init/all.js @@ -147,9 +147,6 @@ pref("dom.enable_resource_timing", true); // Enable high-resolution timing markers for users pref("dom.enable_user_timing", true); -// Enable printing performance marks/measures to log -pref("dom.performance.enable_user_timing_logging", false); - // Whether the Gamepad API is enabled pref("dom.gamepad.enabled", true); #ifdef RELEASE_BUILD