Bug 1164620 - Part 2: Wrap expensive calls in PR_LOG_TEST. r=froydnj
authorEric Rahm <erahm@mozilla.com>
Thu, 14 May 2015 10:13:24 -0700
changeset 243821 037f6f313aba778f0354c5a13a4601afdd43e0dd
parent 243820 dd750b3d18c5c96a0a04069eefd8bca79dac14d2
child 243822 710a15bf959f4d56903d20e549e5f49a3831f79f
push id28753
push userkwierso@gmail.com
push dateThu, 14 May 2015 22:33:43 +0000
treeherdermozilla-central@07e2e15703cb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1164620
milestone41.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1164620 - Part 2: Wrap expensive calls in PR_LOG_TEST. r=froydnj
extensions/auth/nsAuthGSSAPI.cpp
--- a/extensions/auth/nsAuthGSSAPI.cpp
+++ b/extensions/auth/nsAuthGSSAPI.cpp
@@ -227,16 +227,20 @@ gssInit()
     return NS_OK;
 }
 
 // Generate proper GSSAPI error messages from the major and
 // minor status codes.
 void
 LogGssError(OM_uint32 maj_stat, OM_uint32 min_stat, const char *prefix)
 {
+    if (!PR_LOG_TEST(gNegotiateLog, PR_LOG_DEBUG)) {
+        return;
+    }
+
     OM_uint32 new_stat;
     OM_uint32 msg_ctx = 0;
     gss_buffer_desc status1_string;
     gss_buffer_desc status2_string;
     OM_uint32 ret;
     nsAutoCString errorStr;
     errorStr.Assign(prefix);