⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 288232 in webkit


Ignore:
Timestamp:
Jan 19, 2022, 12:38:21 PM (5 years ago)
Author:
Chris Dumez
Message:

WebKit::DownloadProxy::publishProgress() falls through ASSERT_NOT_REACHED()
​https://bugs.webkit.org/show_bug.cgi?id=234975
<rdar://problem/87265153>

Reviewed by Darin Adler.

  • UIProcess/Downloads/DownloadProxy.cpp:

(WebKit::DownloadProxy::publishProgress):
Let's not send the IPC if we failed to create the handle since the recipient code early returns when the handle is
invalid.

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r288216 r288232  
     12022-01-19  Chris Dumez  <cdumez@apple.com>
     2
     3        WebKit::DownloadProxy::publishProgress() falls through ASSERT_NOT_REACHED()
     4        https://bugs.webkit.org/show_bug.cgi?id=234975
     5        <rdar://problem/87265153>
     6
     7        Reviewed by Darin Adler.
     8
     9        * UIProcess/Downloads/DownloadProxy.cpp:
     10        (WebKit::DownloadProxy::publishProgress):
     11        Let's not send the IPC if we failed to create the handle since the recipient code early returns when the handle is
     12        invalid.
     13
    1142022-01-19  Alex Christensen  <achristensen@webkit.org>
    215
  • trunk/Source/WebKit/UIProcess/Downloads/DownloadProxy.cpp

    r286815 r288232  
    107107        return;
    108108
    109     SandboxExtension::Handle handle;
    110     if (auto createdHandle = SandboxExtension::createHandle(URL.fileSystemPath(), SandboxExtension::Type::ReadWrite))
    111         handle = WTFMove(*createdHandle);
    112     else
    113         ASSERT_NOT_REACHED();
    114 
    115     m_dataStore->networkProcess().send(Messages::NetworkProcess::PublishDownloadProgress(m_downloadID, URL, handle), 0);
     109    auto handle = SandboxExtension::createHandle(URL.fileSystemPath(), SandboxExtension::Type::ReadWrite);
     110    ASSERT(handle);
     111    if (!handle)
     112        return;
     113
     114    m_dataStore->networkProcess().send(Messages::NetworkProcess::PublishDownloadProgress(m_downloadID, URL, *handle), 0);
    116115}
    117116#endif // PLATFORM(COCOA)
Note: See TracChangeset for help on using the changeset viewer.