Title: [141447] trunk/Source
Revision
141447
Author
beid...@apple.com
Date
2013-01-31 11:06:51 -0800 (Thu, 31 Jan 2013)

Log Message

Lack of a log level string should not obliterate compiled in logging channel state.
https://bugs.webkit.org/show_bug.cgi?id=108502

Reviewed by Alexey Proskuryakov and Sam Weinig.

Source/WebKit/mac:

* Misc/WebKitLogging.m: If there's no log level string, leave the channel state alone.

Source/WebKit2:

* Platform/mac/Logging.mac.mm:
(WebKit::initializeLogChannel): If there's no log level string, leave the channel state alone.

Modified Paths

Diff

Modified: trunk/Source/WebKit/mac/ChangeLog (141446 => 141447)


--- trunk/Source/WebKit/mac/ChangeLog	2013-01-31 19:06:28 UTC (rev 141446)
+++ trunk/Source/WebKit/mac/ChangeLog	2013-01-31 19:06:51 UTC (rev 141447)
@@ -1,3 +1,12 @@
+2013-01-31  Brady Eidson  <beid...@apple.com>
+
+        Lack of a log level string should not obliterate compiled in logging channel state.
+        https://bugs.webkit.org/show_bug.cgi?id=108502
+
+        Reviewed by Alexey Proskuryakov and Sam Weinig.
+
+        * Misc/WebKitLogging.m: If there's no log level string, leave the channel state alone.
+
 2013-01-29  Sheriff Bot  <webkit.review....@gmail.com>
 
         Unreviewed, rolling out r140983.

Modified: trunk/Source/WebKit/mac/Misc/WebKitLogging.m (141446 => 141447)


--- trunk/Source/WebKit/mac/Misc/WebKitLogging.m	2013-01-31 19:06:28 UTC (rev 141446)
+++ trunk/Source/WebKit/mac/Misc/WebKitLogging.m	2013-01-31 19:06:51 UTC (rev 141447)
@@ -57,9 +57,11 @@
 
 static void initializeLogChannel(WTFLogChannel *channel)
 {
-    channel->state = WTFLogChannelOff;
     NSString *logLevelString = [[NSUserDefaults standardUserDefaults] objectForKey:[NSString stringWithUTF8String:channel->defaultName]];
+
+    // If there's no log level string from the user defaults, don't obliterate the compiled in values.
     if (logLevelString) {
+        channel->state = WTFLogChannelOff;
         unsigned logLevel;
         if (![[NSScanner scannerWithString:logLevelString] scanHexInt:&logLevel])
             NSLog(@"unable to parse hex value for %s (%@), logging is off", channel->defaultName, logLevelString);

Modified: trunk/Source/WebKit2/ChangeLog (141446 => 141447)


--- trunk/Source/WebKit2/ChangeLog	2013-01-31 19:06:28 UTC (rev 141446)
+++ trunk/Source/WebKit2/ChangeLog	2013-01-31 19:06:51 UTC (rev 141447)
@@ -1,3 +1,13 @@
+2013-01-31  Brady Eidson  <beid...@apple.com>
+
+        Lack of a log level string should not obliterate compiled in logging channel state.
+        https://bugs.webkit.org/show_bug.cgi?id=108502
+
+        Reviewed by Alexey Proskuryakov and Sam Weinig.
+
+        * Platform/mac/Logging.mac.mm:
+        (WebKit::initializeLogChannel): If there's no log level string, leave the channel state alone.
+
 2013-01-31  Alexey Proskuryakov  <a...@apple.com>
 
         WebProcess sandbox profile overhaul.

Modified: trunk/Source/WebKit2/Platform/mac/Logging.mac.mm (141446 => 141447)


--- trunk/Source/WebKit2/Platform/mac/Logging.mac.mm	2013-01-31 19:06:28 UTC (rev 141446)
+++ trunk/Source/WebKit2/Platform/mac/Logging.mac.mm	2013-01-31 19:06:51 UTC (rev 141447)
@@ -32,11 +32,13 @@
 
 void initializeLogChannel(WTFLogChannel* channel)
 {
-    channel->state = WTFLogChannelOff;
+    // If there is no log level string from the user defaults then don't change the logging channel at all.
     NSString *logLevelString = [[NSUserDefaults standardUserDefaults] objectForKey:[NSString stringWithUTF8String:channel->defaultName]];
     if (!logLevelString)
         return;
-        
+
+    channel->state = WTFLogChannelOff;
+
     unsigned logLevel;
     if (![[NSScanner scannerWithString:logLevelString] scanHexInt:&logLevel])
         NSLog(@"unable to parse hex value for %s (%@), logging is off", channel->defaultName, logLevelString);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to