Changeset 141447 in webkit


Ignore:
Timestamp:
Jan 31, 2013, 11:06:51 AM (12 years ago)
Author:
beidson@apple.com
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.

Location:
trunk/Source
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/mac/ChangeLog

    r141202 r141447  
     12013-01-31  Brady Eidson  <beidson@apple.com>
     2
     3        Lack of a log level string should not obliterate compiled in logging channel state.
     4        https://bugs.webkit.org/show_bug.cgi?id=108502
     5
     6        Reviewed by Alexey Proskuryakov and Sam Weinig.
     7
     8        * Misc/WebKitLogging.m: If there's no log level string, leave the channel state alone.
     9
    1102013-01-29  Sheriff Bot  <webkit.review.bot@gmail.com>
    211
  • trunk/Source/WebKit/mac/Misc/WebKitLogging.m

    r121707 r141447  
    5858static void initializeLogChannel(WTFLogChannel *channel)
    5959{
    60     channel->state = WTFLogChannelOff;
    6160    NSString *logLevelString = [[NSUserDefaults standardUserDefaults] objectForKey:[NSString stringWithUTF8String:channel->defaultName]];
     61
     62    // If there's no log level string from the user defaults, don't obliterate the compiled in values.
    6263    if (logLevelString) {
     64        channel->state = WTFLogChannelOff;
    6365        unsigned logLevel;
    6466        if (![[NSScanner scannerWithString:logLevelString] scanHexInt:&logLevel])
  • trunk/Source/WebKit2/ChangeLog

    r141445 r141447  
     12013-01-31  Brady Eidson  <beidson@apple.com>
     2
     3        Lack of a log level string should not obliterate compiled in logging channel state.
     4        https://bugs.webkit.org/show_bug.cgi?id=108502
     5
     6        Reviewed by Alexey Proskuryakov and Sam Weinig.
     7
     8        * Platform/mac/Logging.mac.mm:
     9        (WebKit::initializeLogChannel): If there's no log level string, leave the channel state alone.
     10
    1112013-01-31  Alexey Proskuryakov  <ap@apple.com>
    212
  • trunk/Source/WebKit2/Platform/mac/Logging.mac.mm

    r95901 r141447  
    3333void initializeLogChannel(WTFLogChannel* channel)
    3434{
    35     channel->state = WTFLogChannelOff;
     35    // If there is no log level string from the user defaults then don't change the logging channel at all.
    3636    NSString *logLevelString = [[NSUserDefaults standardUserDefaults] objectForKey:[NSString stringWithUTF8String:channel->defaultName]];
    3737    if (!logLevelString)
    3838        return;
    39        
     39
     40    channel->state = WTFLogChannelOff;
     41
    4042    unsigned logLevel;
    4143    if (![[NSScanner scannerWithString:logLevelString] scanHexInt:&logLevel])
Note: See TracChangeset for help on using the changeset viewer.