Bug 1419771 - Introduce DOMPreferences, a thread-safe access to preferences for DOM - part 5 - Performance logging enabled, r=asuth

This commit is contained in:
Andrea Marchesini
2017-11-30 18:16:44 +01:00
parent b107b07f59
commit e0c43ef19a
7 changed files with 9 additions and 17 deletions

View File

@@ -6,6 +6,7 @@
#include "PerformanceMainThread.h"
#include "PerformanceNavigation.h"
#include "mozilla/dom/DOMPreferences.h"
#include "nsICacheInfoChannel.h"
namespace mozilla {
@@ -271,7 +272,7 @@ PerformanceMainThread::InsertUserEntry(PerformanceEntry* aEntry)
nsAutoCString uri;
uint64_t markCreationEpoch = 0;
if (nsContentUtils::IsUserTimingLoggingEnabled() ||
if (DOMPreferences::PerformanceLoggingEnabled() ||
nsContentUtils::SendPerformanceTimingNotifications()) {
nsresult rv = NS_ERROR_FAILURE;
nsCOMPtr<nsPIDOMWindowInner> owner = GetOwner();
@@ -285,7 +286,7 @@ PerformanceMainThread::InsertUserEntry(PerformanceEntry* aEntry)
}
markCreationEpoch = static_cast<uint64_t>(PR_Now() / PR_USEC_PER_MSEC);
if (nsContentUtils::IsUserTimingLoggingEnabled()) {
if (DOMPreferences::PerformanceLoggingEnabled()) {
Performance::LogEntry(aEntry, uri);
}
}