Bug 209195 - Use sendWithAsyncReply for DecideDestinationWithSuggestedFilename
Summary: Use sendWithAsyncReply for DecideDestinationWithSuggestedFilename
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: InRadar
Depends on:
Blocks:
 
Reported: 2020-03-17 14:38 PDT by Alex Christensen
Modified: 2020-10-05 15:39 PDT (History)
4 users (show)

See Also:


Attachments
Patch (18.47 KB, patch)
2020-03-17 14:40 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (18.78 KB, patch)
2020-03-17 14:56 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (19.96 KB, patch)
2020-10-05 13:11 PDT, Alex Christensen
thorton: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Christensen 2020-03-17 14:38:55 PDT
Use sendWithAsyncReply for DecideDestinationWithSuggestedFilename
Comment 1 Alex Christensen 2020-03-17 14:40:04 PDT
Created attachment 393791 [details]
Patch
Comment 2 Alex Christensen 2020-03-17 14:56:29 PDT
Created attachment 393792 [details]
Patch
Comment 3 Kate Cheney 2020-10-01 11:00:24 PDT
Comment on attachment 393792 [details]
Patch

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

> Source/WebKit/NetworkProcess/NetworkProcess.cpp:2080
> +        DownloadID downloadID = networkDataTask->pendingDownloadID();

could be auto downloadID? it's a bit shorter.

> Source/WebKit/NetworkProcess/NetworkProcess.cpp:2089
> +        networkDataTask->setPendingDownloadLocation(destination, WTFMove(sandboxExtensionHandle), allowOverwrite == AllowOverwrite::Yes);

I see the ordering of these statements changed from DownloadManager::continueDecidePendingDownloadDestination(), so now networkDataTask->setPendingDownloadLocation() won't be called if the state is canceling or completed. Was that intentional?
Comment 4 Alex Christensen 2020-10-05 13:11:40 PDT
That was unintentional, and it was the cause of the test failures.
Comment 5 Alex Christensen 2020-10-05 13:11:53 PDT
Created attachment 410545 [details]
Patch
Comment 6 Alex Christensen 2020-10-05 15:29:40 PDT
Comment on attachment 410545 [details]
Patch

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

> Source/WebKit/NetworkProcess/Downloads/DownloadID.h:37
> +// FIXME: This should be an ObjectIdentifier.

Note: this is being done in https://bugs.webkit.org/show_bug.cgi?id=203962
Comment 7 Alex Christensen 2020-10-05 15:38:23 PDT
http://trac.webkit.org/r268008
Comment 8 Radar WebKit Bug Importer 2020-10-05 15:39:20 PDT
<rdar://problem/69974215>