Title: [222497] trunk/Source/WebCore/PAL
Revision
222497
Author
[email protected]
Date
2017-09-26 01:38:16 -0700 (Tue, 26 Sep 2017)

Log Message

[GCrypt] Only report libgcrypt errors when logging is enabled
https://bugs.webkit.org/show_bug.cgi?id=177360

Reviewed by Xabier Rodriguez-Calvar.

* pal/crypto/gcrypt/Utilities.h:
(PAL::GCrypt::logError): Only print out the libgcrypt error on stderr
when logging is enabled at build-time, avoiding unnecessary output in
non-debugging use cases.

Modified Paths

Diff

Modified: trunk/Source/WebCore/PAL/ChangeLog (222496 => 222497)


--- trunk/Source/WebCore/PAL/ChangeLog	2017-09-26 08:13:38 UTC (rev 222496)
+++ trunk/Source/WebCore/PAL/ChangeLog	2017-09-26 08:38:16 UTC (rev 222497)
@@ -1,3 +1,15 @@
+2017-09-26  Zan Dobersek  <[email protected]>
+
+        [GCrypt] Only report libgcrypt errors when logging is enabled
+        https://bugs.webkit.org/show_bug.cgi?id=177360
+
+        Reviewed by Xabier Rodriguez-Calvar.
+
+        * pal/crypto/gcrypt/Utilities.h:
+        (PAL::GCrypt::logError): Only print out the libgcrypt error on stderr
+        when logging is enabled at build-time, avoiding unnecessary output in
+        non-debugging use cases.
+
 2017-09-25  Timothy Horton  <[email protected]>
 
         Make progress on getting Mac CMake building again

Modified: trunk/Source/WebCore/PAL/pal/crypto/gcrypt/Utilities.h (222496 => 222497)


--- trunk/Source/WebCore/PAL/pal/crypto/gcrypt/Utilities.h	2017-09-26 08:13:38 UTC (rev 222496)
+++ trunk/Source/WebCore/PAL/pal/crypto/gcrypt/Utilities.h	2017-09-26 08:38:16 UTC (rev 222497)
@@ -43,8 +43,13 @@
 
 static inline void logError(gcry_error_t error)
 {
+    // FIXME: Use a WebCrypto WTF log channel here once those are moved down to PAL.
+#if !LOG_DISABLED
     WTFLogAlways("libgcrypt error: source '%s', description '%s'",
         gcry_strsource(error), gcry_strerror(error));
+#else
+    UNUSED_PARAM(error);
+#endif
 }
 
 static inline std::optional<int> aesAlgorithmForKeySize(size_t keySize)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to