WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 177625
[WK2][NetworkSession] Add support for resuming downloads
https://bugs.webkit.org/show_bug.cgi?id=177625
Summary
[WK2][NetworkSession] Add support for resuming downloads
Chris Dumez
Reported
2017-09-28 15:02:41 PDT
Add support for resuming downloads for the WK2 NETWORK_SESSION code path.
Attachments
WIP Patch
(13.49 KB, patch)
2017-09-28 15:03 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
WIP Patch
(13.82 KB, patch)
2017-09-28 15:38 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
WIP Patch
(14.15 KB, patch)
2017-09-28 15:53 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
WIP Patch
(14.27 KB, patch)
2017-09-28 16:05 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
WIP Patch
(14.21 KB, patch)
2017-09-28 16:19 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
WIP Patch
(13.93 KB, patch)
2017-09-28 16:33 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
WIP Patch
(14.62 KB, patch)
2017-09-29 15:54 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
WIP Patch
(13.87 KB, patch)
2017-09-29 16:04 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
WIP Patch
(13.92 KB, patch)
2017-10-03 15:55 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(16.23 KB, patch)
2017-10-04 14:07 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(16.53 KB, patch)
2017-10-05 09:09 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Show Obsolete
(10)
View All
Add attachment
proposed patch, testcase, etc.
Chris Dumez
Comment 1
2017-09-28 15:02:57 PDT
<
rdar://problem/34345975
>
Chris Dumez
Comment 2
2017-09-28 15:03:55 PDT
Created
attachment 322122
[details]
WIP Patch
Build Bot
Comment 3
2017-09-28 15:06:05 PDT
Attachment 322122
[details]
did not pass style-queue: ERROR: Source/WebKit/NetworkProcess/Downloads/cocoa/DownloadCocoa.mm:44: No space between ^ and block definition. [whitespace/brackets] [4] ERROR: Source/WebKit/NetworkProcess/Downloads/cocoa/DownloadCocoa.mm:45: Missing space after , [whitespace/comma] [3] Total errors found: 2 in 8 files If any of these errors are false positives, please file a bug against check-webkit-style.
Chris Dumez
Comment 4
2017-09-28 15:38:28 PDT
Created
attachment 322129
[details]
WIP Patch
Build Bot
Comment 5
2017-09-28 15:41:16 PDT
Attachment 322129
[details]
did not pass style-queue: ERROR: Source/WebKit/NetworkProcess/Downloads/cocoa/DownloadCocoa.mm:44: No space between ^ and block definition. [whitespace/brackets] [4] ERROR: Source/WebKit/NetworkProcess/Downloads/cocoa/DownloadCocoa.mm:45: Missing space after , [whitespace/comma] [3] Total errors found: 2 in 8 files If any of these errors are false positives, please file a bug against check-webkit-style.
Chris Dumez
Comment 6
2017-09-28 15:53:56 PDT
Created
attachment 322132
[details]
WIP Patch
Chris Dumez
Comment 7
2017-09-28 16:05:33 PDT
Created
attachment 322134
[details]
WIP Patch
Chris Dumez
Comment 8
2017-09-28 16:19:57 PDT
Created
attachment 322138
[details]
WIP Patch
Chris Dumez
Comment 9
2017-09-28 16:33:29 PDT
Created
attachment 322141
[details]
WIP Patch
Alex Christensen
Comment 10
2017-09-28 17:03:11 PDT
See
rdar://problem/23041906
Chris Dumez
Comment 11
2017-09-29 15:54:00 PDT
Created
attachment 322248
[details]
WIP Patch
Chris Dumez
Comment 12
2017-09-29 16:04:37 PDT
Created
attachment 322250
[details]
WIP Patch
Chris Dumez
Comment 13
2017-10-03 15:55:56 PDT
Created
attachment 322600
[details]
WIP Patch
Chris Dumez
Comment 14
2017-10-04 14:07:07 PDT
Created
attachment 322726
[details]
Patch
Daniel Bates
Comment 15
2017-10-04 23:44:16 PDT
Comment on
attachment 322726
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=322726&action=review
> Source/WebKit/ChangeLog:13 > + when cancelling an download over non-HTTP.
an => a
> Source/WebKit/ChangeLog:23 > + (WebKit::Download::resume):
Please mention the workaround here.
> Source/WebKit/NetworkProcess/Downloads/cocoa/DownloadCocoa.mm:46 > + WTFLogAlways("Could not find network session with given sessionID");
sessionID => session ID Would it be helpful to include the value of m_sessionID in the logged message?
> Source/WebKit/NetworkProcess/Downloads/cocoa/DownloadCocoa.mm:53 > + NSMutableDictionary *dictionary = [NSPropertyListSerialization propertyListWithData:nsData.get() options:NSPropertyListImmutable format:0 error:NULL];
NULL => nullptr (Since this is Objective-C++)
> Source/WebKit/NetworkProcess/Downloads/cocoa/DownloadCocoa.mm:54 > + [dictionary setObject:(NSString *)path forKey:@"NSURLSessionResumeInfoLocalPath"];
static_cast<NSString*>(...) (Since this is Objective-C++)
> Source/WebKit/NetworkProcess/Downloads/cocoa/DownloadCocoa.mm:55 > + NSData *updatedData = [NSPropertyListSerialization dataWithPropertyList:dictionary format:NSPropertyListXMLFormat_v1_0 options:0 error:NULL];
NULL => nullptr
> Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.h:63 > + NSURLSessionDownloadTask *downloadTaskWithResumeData(NSData *);
* is on the wrong side.
> Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm:279 > + WebCore::AuthenticationChallenge authenticationChallenge(challenge);
Uniform initializer syntax?
> Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm:677 > +NSURLSessionDownloadTask *NetworkSessionCocoa::downloadTaskWithResumeData(NSData *resumeData)
*s are on the wrong side since this is a C++ member function.
Chris Dumez
Comment 16
2017-10-05 09:09:44 PDT
Created
attachment 322842
[details]
Patch
Chris Dumez
Comment 17
2017-10-05 09:10:42 PDT
(In reply to Daniel Bates from
comment #15
)
> Comment on
attachment 322726
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=322726&action=review
> > > Source/WebKit/ChangeLog:13 > > + when cancelling an download over non-HTTP. > > an => a > > > Source/WebKit/ChangeLog:23 > > + (WebKit::Download::resume): > > Please mention the workaround here. > > > Source/WebKit/NetworkProcess/Downloads/cocoa/DownloadCocoa.mm:46 > > + WTFLogAlways("Could not find network session with given sessionID"); > > sessionID => session ID > > Would it be helpful to include the value of m_sessionID in the logged > message? > > > Source/WebKit/NetworkProcess/Downloads/cocoa/DownloadCocoa.mm:53 > > + NSMutableDictionary *dictionary = [NSPropertyListSerialization propertyListWithData:nsData.get() options:NSPropertyListImmutable format:0 error:NULL]; > > NULL => nullptr > > (Since this is Objective-C++) > > > Source/WebKit/NetworkProcess/Downloads/cocoa/DownloadCocoa.mm:54 > > + [dictionary setObject:(NSString *)path forKey:@"NSURLSessionResumeInfoLocalPath"]; > > static_cast<NSString*>(...) > > (Since this is Objective-C++) > > > Source/WebKit/NetworkProcess/Downloads/cocoa/DownloadCocoa.mm:55 > > + NSData *updatedData = [NSPropertyListSerialization dataWithPropertyList:dictionary format:NSPropertyListXMLFormat_v1_0 options:0 error:NULL]; > > NULL => nullptr > > > Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.h:63 > > + NSURLSessionDownloadTask *downloadTaskWithResumeData(NSData *); > > * is on the wrong side. > > > Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm:279 > > + WebCore::AuthenticationChallenge authenticationChallenge(challenge); > > Uniform initializer syntax? > > > Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm:677 > > +NSURLSessionDownloadTask *NetworkSessionCocoa::downloadTaskWithResumeData(NSData *resumeData) > > *s are on the wrong side since this is a C++ member function.
Thanks, I merged all review comments.
Chris Dumez
Comment 18
2017-10-16 12:31:52 PDT
Alex, ping review?
WebKit Commit Bot
Comment 19
2017-10-16 13:29:39 PDT
Comment on
attachment 322842
[details]
Patch Clearing flags on attachment: 322842 Committed
r223431
: <
https://trac.webkit.org/changeset/223431
>
WebKit Commit Bot
Comment 20
2017-10-16 13:29:40 PDT
All reviewed patches have been landed. Closing bug.
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