Changeset 206097 in webkit


Ignore:
Timestamp:
Sep 19, 2016 9:01:08 AM (8 years ago)
Author:
commit-queue@webkit.org
Message:

Only override URLParser::enabled if NSUserDefaults object exists
https://bugs.webkit.org/show_bug.cgi?id=162131

Patch by Alex Christensen <achristensen@webkit.org> on 2016-09-19
Reviewed by Sam Weinig.

  • Shared/Cocoa/WebKit2InitializeCocoa.mm:

(WebKit::platformInitializeWebKit2):

  • Shared/WebKit2Initialize.cpp:

When I enable URLParser by default, I will want the default to only be overwritten if there is a
NSUserDefaults key for URLParserEnabled. Right now it is setting URLParser::enabled to false always,
which isn't a problem because the default is also false. When the default is true, that will overwrite the default.

Location:
trunk/Source/WebKit2
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r206091 r206097  
     12016-09-19  Alex Christensen  <achristensen@webkit.org>
     2
     3        Only override URLParser::enabled if NSUserDefaults object exists
     4        https://bugs.webkit.org/show_bug.cgi?id=162131
     5
     6        Reviewed by Sam Weinig.
     7
     8        * Shared/Cocoa/WebKit2InitializeCocoa.mm:
     9        (WebKit::platformInitializeWebKit2):
     10        * Shared/WebKit2Initialize.cpp:
     11        When I enable URLParser by default, I will want the default to only be overwritten if there is a
     12        NSUserDefaults key for URLParserEnabled.  Right now it is setting URLParser::enabled to false always,
     13        which isn't a problem because the default is also false.  When the default is true, that will overwrite the default.
     14
    1152016-09-19  Joseph Pecoraro  <pecoraro@apple.com>
    216
  • trunk/Source/WebKit2/Shared/Cocoa/WebKit2InitializeCocoa.mm

    r205266 r206097  
    4141    if (processType == UIProcess) {
    4242        dispatch_once(&initOnce, ^ {
    43             URLParser::setEnabled([[NSUserDefaults standardUserDefaults] boolForKey:@"URLParserEnabled"]);
     43            NSString *key = @"URLParserEnabled";
     44            if ([[NSUserDefaults standardUserDefaults] objectForKey:key])
     45                URLParser::setEnabled([[NSUserDefaults standardUserDefaults] boolForKey:key]);
    4446        });
    4547    }
  • trunk/Source/WebKit2/Shared/WebKit2Initialize.cpp

    r205275 r206097  
    2929#include "LogInitialization.h"
    3030#include <WebCore/LogInitialization.h>
    31 #include <WebCore/URLParser.h>
    3231#include <runtime/InitializeThreading.h>
    3332#include <wtf/MainThread.h>
Note: See TracChangeset for help on using the changeset viewer.