Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WPE][GTK] API test
TestDownloads
`/webkit/Downloads/local-file-err…
…or` is flaky https://bugs.webkit.org/show_bug.cgi?id=259210 Reviewed by Carlos Garcia Campos. In one of the subtests, we start downloading a local file and then immediately cancel it. When the download completes fast, `WebKitDownloadClient::didFinish()` method can be called twice. Firstly, because the download is actually completed, and secondly, from `Download::cancel()`'s completion handler, which we set in `webkit_download_cancel()'. Since we set `m_download` to `nullptr` in `WebKitDownloadClient::didFinish()`, the second call will crash. The solution is to call `WebKitDownloadClient::legacyDidCancel()` instead of `WebKitDownloadClient::didFinish()` from the download's cancel completion handler. * Source/WebKit/UIProcess/API/glib/WebKitDownload.cpp: * Source/WebKit/UIProcess/API/glib/WebKitDownloadClient.cpp: Canonical link: https://commits.webkit.org/266725@main
- Loading branch information