RESOLVED FIXED 137322
WKDownloadCopyRequest() returns 0 until the download starts
https://bugs.webkit.org/show_bug.cgi?id=137322
Summary WKDownloadCopyRequest() returns 0 until the download starts
Jeff Miller
Reported 2014-10-01 16:25:27 PDT
If a client creates a download using WKContextDownloadURLRequest(), WKDownloadCopyRequest() won't return the request until the download starts.
Attachments
Patch (13.63 KB, patch)
2014-10-02 11:03 PDT, Jeff Miller
no flags
Patch (13.70 KB, patch)
2014-10-02 11:42 PDT, Jeff Miller
andersca: review+
Radar WebKit Bug Importer
Comment 1 2014-10-01 16:25:56 PDT
Jeff Miller
Comment 2 2014-10-01 16:26:47 PDT
The actual Radar bug is <rdar://problem/10046884>
Jeff Miller
Comment 3 2014-10-02 11:03:42 PDT
Anders Carlsson
Comment 4 2014-10-02 11:32:19 PDT
Comment on attachment 239119 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=239119&action=review > Source/WebKit2/UIProcess/WebPageProxy.cpp:1791 > + ASSERT(m_decidePolicyForResponseRequest); I don't think this is guaranteed to not be null.
Jeff Miller
Comment 5 2014-10-02 11:36:45 PDT
Comment on attachment 239119 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=239119&action=review >> Source/WebKit2/UIProcess/WebPageProxy.cpp:1791 >> + ASSERT(m_decidePolicyForResponseRequest); > > I don't think this is guaranteed to not be null. I wasn't 100% sure about this, either. I'll update the patch to pass a reference to ResourceRequest() if it is null.
Jeff Miller
Comment 6 2014-10-02 11:42:20 PDT
Anders Carlsson
Comment 7 2014-10-02 13:48:54 PDT
Comment on attachment 239123 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=239123&action=review > Source/WebKit2/UIProcess/WebPageProxy.cpp:1792 > + const ResourceRequest& downloadRequest = m_decidePolicyForResponseRequest ? *m_decidePolicyForResponseRequest : ResourceRequest(); > + DownloadProxy* download = m_process->context().createDownloadProxy(downloadRequest); I'd add a FIXME about ensuring that this ResourceRequest is never empty.
Jeff Miller
Comment 8 2014-10-02 14:01:33 PDT
Note You need to log in before you can comment on or make changes to this bug.