Bug 234975 - WebKit::DownloadProxy::publishProgress() falls through ASSERT_NOT_REACHED()
Summary: WebKit::DownloadProxy::publishProgress() falls through ASSERT_NOT_REACHED()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on: 228875 234932
Blocks:
  Show dependency treegraph
 
Reported: 2022-01-07 11:55 PST by David Kilzer (:ddkilzer)
Modified: 2022-01-20 21:00 PST (History)
5 users (show)

See Also:


Attachments
Patch (2.03 KB, patch)
2022-01-19 10:00 PST, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Kilzer (:ddkilzer) 2022-01-07 11:55:59 PST
WebKit::DownloadProxy::publishProgress() falls through ASSERT_NOT_REACHED().

There should be an early return in the `else` block after ASSERT_NOT_REACHED().

#if PLATFORM(COCOA)
void DownloadProxy::publishProgress(const URL& URL)
{
    if (!m_dataStore)
        return;

    SandboxExtension::Handle handle;
    if (auto createdHandle = SandboxExtension::createHandle(URL.fileSystemPath(), SandboxExtension::Type::ReadWrite))
        handle = WTFMove(*createdHandle);
    else
        ASSERT_NOT_REACHED();

    m_dataStore->networkProcess().send(Messages::NetworkProcess::PublishDownloadProgress(m_downloadID, URL, handle), 0);
}
#endif // PLATFORM(COCOA)

See Source/WebKit/UIProcess/Downloads/DownloadProxy.cpp.
Comment 1 Radar WebKit Bug Importer 2022-01-07 11:56:18 PST
<rdar://problem/87265153>
Comment 2 Chris Dumez 2022-01-19 10:00:44 PST
Created attachment 449491 [details]
Patch
Comment 3 EWS 2022-01-19 12:39:51 PST
Committed r288232 (246189@main): <https://commits.webkit.org/246189@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 449491 [details].