Bug 976971 - test log level directly when creating textperf object. r=heycam
authorJohn Daggett <jdaggett@mozilla.com>
Thu, 27 Feb 2014 08:41:28 +0900
changeset 170878 8e126867f92618c084416eceac6d1ef3c4bd3dd8
parent 170877 320198fc474fca139d8d1afb9ce28ad8d99cf412
child 170879 2fb5b3b138d72d15119eadd6641e80776c0dca56
push id5335
push usercbook@mozilla.com
push dateThu, 27 Feb 2014 14:43:43 +0000
treeherderfx-team@fb009d10f3e6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersheycam
bugs976971
milestone30.0a1
Bug 976971 - test log level directly when creating textperf object. r=heycam
layout/base/nsPresContext.cpp
--- a/layout/base/nsPresContext.cpp
+++ b/layout/base/nsPresContext.cpp
@@ -297,17 +297,17 @@ nsPresContext::nsPresContext(nsIDocument
     mNeverAnimate = false;
   }
   NS_ASSERTION(mDocument, "Null document");
   mUserFontSet = nullptr;
   mUserFontSetDirty = true;
 
   // if text perf logging enabled, init stats struct
   PRLogModuleInfo *log = gfxPlatform::GetLog(eGfxLog_textperf);
-  if (log && PR_LOG_TEST(log, PR_LOG_WARNING)) {
+  if (log && log->level >= PR_LOG_WARNING) {
     mTextPerf = new gfxTextPerfMetrics();
   }
 
   PR_INIT_CLIST(&mDOMMediaQueryLists);
 }
 
 nsPresContext::~nsPresContext()
 {