WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
125379
Refactor the CFURLConnectionClient to be the synchronous implementation of an abstract network delegate
https://bugs.webkit.org/show_bug.cgi?id=125379
Summary
Refactor the CFURLConnectionClient to be the synchronous implementation of an...
Benjamin Poulain
Reported
2013-12-06 21:47:09 PST
Refactor the CFURLConnectionClient to be the synchronous implementation of an abstract network delegate
Attachments
Patch
(68.38 KB, patch)
2013-12-06 21:54 PST
,
Benjamin Poulain
no flags
Details
Formatted Diff
Diff
Patch
(68.39 KB, patch)
2013-12-06 22:57 PST
,
Benjamin Poulain
no flags
Details
Formatted Diff
Diff
Patch
(68.67 KB, patch)
2013-12-08 21:57 PST
,
Benjamin Poulain
no flags
Details
Formatted Diff
Diff
Patch
(69.68 KB, patch)
2013-12-08 22:40 PST
,
Benjamin Poulain
no flags
Details
Formatted Diff
Diff
Patch
(69.91 KB, patch)
2013-12-09 01:33 PST
,
Benjamin Poulain
ap
: review+
Details
Formatted Diff
Diff
Show Obsolete
(4)
View All
Add attachment
proposed patch, testcase, etc.
Benjamin Poulain
Comment 1
2013-12-06 21:54:31 PST
Created
attachment 218650
[details]
Patch
Build Bot
Comment 2
2013-12-06 22:36:11 PST
Comment on
attachment 218650
[details]
Patch
Attachment 218650
[details]
did not pass win-ews (win): Output:
http://webkit-queues.appspot.com/results/46498007
Benjamin Poulain
Comment 3
2013-12-06 22:57:05 PST
Created
attachment 218652
[details]
Patch
Build Bot
Comment 4
2013-12-06 23:37:44 PST
Comment on
attachment 218652
[details]
Patch
Attachment 218652
[details]
did not pass win-ews (win): Output:
http://webkit-queues.appspot.com/results/46618001
Benjamin Poulain
Comment 5
2013-12-08 21:57:24 PST
Created
attachment 218725
[details]
Patch
Build Bot
Comment 6
2013-12-08 22:40:11 PST
Comment on
attachment 218725
[details]
Patch
Attachment 218725
[details]
did not pass win-ews (win): Output:
http://webkit-queues.appspot.com/results/44858218
Benjamin Poulain
Comment 7
2013-12-08 22:40:46 PST
Created
attachment 218726
[details]
Patch
Build Bot
Comment 8
2013-12-08 23:24:10 PST
Comment on
attachment 218726
[details]
Patch
Attachment 218726
[details]
did not pass win-ews (win): Output:
http://webkit-queues.appspot.com/results/47178210
Benjamin Poulain
Comment 9
2013-12-09 01:33:08 PST
Created
attachment 218737
[details]
Patch
Alexey Proskuryakov
Comment 10
2013-12-09 09:43:36 PST
Comment on
attachment 218737
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=218737&action=review
> Source/WebCore/platform/network/cf/ResourceHandleCFURLConnectionDelegate.cpp:37 > +} > +ResourceHandleCFURLConnectionDelegate::~ResourceHandleCFURLConnectionDelegate()
Missing empty line here.
> Source/WebCore/platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp:239 > +#if PLATFORM(WIN) > + if (m_handle->client() && !m_handle->client()->shouldCacheResponse(m_handle, cachedResponse)) > + return 0; > +#else > + CFCachedURLResponseRef newResponse = m_handle->client()->willCacheResponse(m_handle, cachedResponse); > + if (newResponse != cachedResponse) > + return newResponse; > +#endif
Why are these different? Strange that we only null check on Windows too.
> Source/WebCore/platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.h:35 > +class SynchronousResourceHandleCFURLConnectionDelegate FINAL : public ResourceHandleCFURLConnectionDelegate {
Thinking about the naming more, I'm still not a fan. This sounds as if it was about synchronous and asynchronous requests, which it is not. Also, both sync and (future) async delegates actually use the same API, the only difference is that one of these is meant to be used on a secondary thread, and has built-in thread hopping. But I don't have a better suggestion.
> Source/WebCore/platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.h:46 > + > +
Two empty lines.
Benjamin Poulain
Comment 11
2013-12-09 15:41:09 PST
(In reply to
comment #10
)
> > Source/WebCore/platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp:239 > > +#if PLATFORM(WIN) > > + if (m_handle->client() && !m_handle->client()->shouldCacheResponse(m_handle, cachedResponse)) > > + return 0; > > +#else > > + CFCachedURLResponseRef newResponse = m_handle->client()->willCacheResponse(m_handle, cachedResponse); > > + if (newResponse != cachedResponse) > > + return newResponse; > > +#endif > > Why are these different? > > Strange that we only null check on Windows too.
Probably historical reasons. The whole API on Windows is different here.
> > Source/WebCore/platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.h:35 > > +class SynchronousResourceHandleCFURLConnectionDelegate FINAL : public ResourceHandleCFURLConnectionDelegate { > > Thinking about the naming more, I'm still not a fan. This sounds as if it was about synchronous and asynchronous requests, which it is not. Also, both sync and (future) async delegates actually use the same API, the only difference is that one of these is meant to be used on a secondary thread, and has built-in thread hopping.
I'll land with the current name. It is not a big deal changing that afterwards (or hopefully getting rid of the classes eventually).
Benjamin Poulain
Comment 12
2013-12-09 15:42:13 PST
Committed
r160338
: <
http://trac.webkit.org/changeset/160338
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug