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 171186 8e126867f92618c084416eceac6d1ef3c4bd3dd8
parent 171185 320198fc474fca139d8d1afb9ce28ad8d99cf412
child 171187 2fb5b3b138d72d15119eadd6641e80776c0dca56
push id270
push userpvanderbeken@mozilla.com
push dateThu, 06 Mar 2014 09:24:21 +0000
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()
 {