Bug 173195 - [Curl] Use SynchronousLoaderClient for platformLoadResourceSynchronously
Summary: [Curl] Use SynchronousLoaderClient for platformLoadResourceSynchronously
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Basuke Suzuki
Depends on:
Blocks: 117300
  Show dependency treegraph
Reported: 2017-06-09 17:18 PDT by Basuke Suzuki
Modified: 2017-06-19 15:23 PDT (History)
7 users (show)

See Also:

Patch (5.87 KB, patch)
2017-06-12 11:54 PDT, Basuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (6.81 KB, patch)
2017-06-12 12:41 PDT, Basuke Suzuki
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Basuke Suzuki 2017-06-09 17:18:21 PDT
Curl implementation uses adhoc loader client to load resource synchronously, but there's no reason not using SynchronousLoaderClient as other port do.
Comment 1 Basuke Suzuki 2017-06-12 11:54:46 PDT
Created attachment 312681 [details]
Comment 2 Build Bot 2017-06-12 11:57:07 PDT
Attachment 312681 [details] did not pass style-queue:

ERROR: Source/WebCore/platform/network/curl/SynchronousLoaderClientCurl.cpp:30:  You should not add a blank line before implementation file's own header.  [build/include_order] [4]
Total errors found: 1 in 3 files

If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Alex Christensen 2017-06-12 12:05:24 PDT
Comment on attachment 312681 [details]

View in context: https://bugs.webkit.org/attachment.cgi?id=312681&action=review

Seems like a step in the right direction to match other ports.  Could you use Tools/Scripts/prepare-ChangeLog to add a ChangeLog entry?

> Source/WebCore/platform/network/curl/ResourceHandleCurl.cpp:130
> +    SynchronousLoaderClient client;
> +    RefPtr<ResourceHandle> handle = adoptRef(new ResourceHandle(context, request, &client, false, false));
> +    if (!handle)
> +        return;

null check isn't needed after new in WebKit.  In fact, you could do Ref<ResourceHandle> handle = adoptRef(*new ResourceHandle(...))
Comment 4 Basuke Suzuki 2017-06-12 12:11:54 PDT
Yeah, I'm working on it. Still figuring out which tool is right for what I want to.
Comment 5 Basuke Suzuki 2017-06-12 12:41:52 PDT
Created attachment 312685 [details]
Comment 6 WebKit Commit Bot 2017-06-12 15:09:59 PDT
Comment on attachment 312685 [details]

Clearing flags on attachment: 312685

Committed r218142: <http://trac.webkit.org/changeset/218142>
Comment 7 WebKit Commit Bot 2017-06-12 15:10:01 PDT
All reviewed patches have been landed.  Closing bug.