Summary: | Add runtime flag for using URLParser | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Alex Christensen <achristensen> | ||||||||||||||||
Component: | New Bugs | Assignee: | Alex Christensen <achristensen> | ||||||||||||||||
Status: | RESOLVED FIXED | ||||||||||||||||||
Severity: | Normal | CC: | mcatanzaro, ossy, sam | ||||||||||||||||
Priority: | P2 | ||||||||||||||||||
Version: | WebKit Nightly Build | ||||||||||||||||||
Hardware: | Unspecified | ||||||||||||||||||
OS: | Unspecified | ||||||||||||||||||
Attachments: |
|
Description
Alex Christensen
2016-08-29 17:06:22 PDT
Created attachment 287355 [details]
Patch
Created attachment 287370 [details]
Patch
Is there anyway to do this without using a compile time flag? I would really like this to be runtime switchable for testing. Created attachment 287424 [details]
Patch
Created attachment 287431 [details]
Patch
Comment on attachment 287431 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=287431&action=review > Source/WebCore/platform/cocoa/URLParserCocoa.mm:35 > +bool URLParser::URLParserEnabled() > +{ > + static bool use = [[NSUserDefaults standardUserDefaults] boolForKey:@"URLParserEnabled"]; > + return use; > +} Doesn't this already happen in your WK2 code? Should it happen? (I thought common wisdom was NO) > Source/WebKit2/Shared/Cocoa/WebKit2InitializeCocoa.mm:40 > + WTFLogAlways("ENABLED %d", getpid()); NOPE > Source/WebKit2/Shared/Cocoa/WebKit2InitializeCocoa.mm:41 > + URLParser::setEnabled([[NSUserDefaults standardUserDefaults] boolForKey:@"URLParserEnabled"]); I thought nope...? Created attachment 287443 [details]
Patch
Created attachment 287515 [details]
Patch
I don't know why efl builds and gtk doesn't. (In reply to comment #9) > I don't know why efl builds and gtk doesn't. The new file needs to be added to PluginProcessGTK2_SOURCES in WebKit2/PlatformGTK.cmake. It has to be built twice, unfortunately. Created attachment 287533 [details]
Patch
(In reply to comment #12) > http://trac.webkit.org/changeset/205266 The build is broken on Apple Mac cmake bot: /Volumes/Data/slave/elcapitan-cmake-debug/build/Source/WebCore/platform/cocoa/URLParserCocoa.mm:31:17: error: out-of-line definition of 'URLParserEnabled' does not match any declaration in 'WebCore::URLParser' bool URLParser::URLParserEnabled() ^~~~~~~~~~~~~~~~ |