Bug 1419771 - Introduce DOMPreferences, a thread-safe access to preferences for DOM - part 5 - Performance logging enabled, r=asuth
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user