Bug 161363 - Add runtime flag for using URLParser
Summary: Add runtime flag for using URLParser
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alex Christensen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-29 17:06 PDT by Alex Christensen
Modified: 2016-09-01 11:40 PDT (History)
3 users (show)

See Also:


Attachments
Patch (12.16 KB, patch)
2016-08-29 17:14 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (12.19 KB, patch)
2016-08-29 21:03 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (19.30 KB, patch)
2016-08-30 13:45 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (28.56 KB, patch)
2016-08-30 14:26 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (38.73 KB, patch)
2016-08-30 15:54 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (38.80 KB, patch)
2016-08-31 09:39 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (39.01 KB, patch)
2016-08-31 13:18 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Christensen 2016-08-29 17:06:22 PDT
Add compile flag for using URLParser
Comment 1 Alex Christensen 2016-08-29 17:14:37 PDT
Created attachment 287355 [details]
Patch
Comment 2 Alex Christensen 2016-08-29 21:03:06 PDT
Created attachment 287370 [details]
Patch
Comment 3 Sam Weinig 2016-08-30 10:12:16 PDT
Is there anyway to do this without using a compile time flag? I would really like this to be runtime switchable for testing.
Comment 4 Alex Christensen 2016-08-30 13:45:09 PDT
Created attachment 287424 [details]
Patch
Comment 5 Alex Christensen 2016-08-30 14:26:33 PDT
Created attachment 287431 [details]
Patch
Comment 6 Brady Eidson 2016-08-30 15:10:10 PDT
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...?
Comment 7 Alex Christensen 2016-08-30 15:54:29 PDT
Created attachment 287443 [details]
Patch
Comment 8 Alex Christensen 2016-08-31 09:39:04 PDT
Created attachment 287515 [details]
Patch
Comment 9 Alex Christensen 2016-08-31 12:46:20 PDT
I don't know why efl builds and gtk doesn't.
Comment 10 Michael Catanzaro 2016-08-31 12:58:47 PDT
(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.
Comment 11 Alex Christensen 2016-08-31 13:18:38 PDT
Created attachment 287533 [details]
Patch
Comment 12 Alex Christensen 2016-08-31 13:21:47 PDT
http://trac.webkit.org/changeset/205266
Comment 13 Csaba Osztrogonác 2016-09-01 08:49:01 PDT
(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()
                ^~~~~~~~~~~~~~~~
Comment 14 Alex Christensen 2016-09-01 11:40:20 PDT
r205302