[webkit-changes] [WebKit/WebKit] b73ca6: [WPE][GTK] API test `TestDownloads` `/webkit/Downl...
Vitaly Dyachkov
noreply at github.com
Wed Aug 9 07:11:12 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: b73ca668112d75dd0975cd8568740eb65f3ff103
https://github.com/WebKit/WebKit/commit/b73ca668112d75dd0975cd8568740eb65f3ff103
Author: Vitaly Dyachkov <vitaly at igalia.com>
Date: 2023-08-09 (Wed, 09 Aug 2023)
Changed paths:
M Source/WebKit/UIProcess/API/glib/WebKitDownload.cpp
M Source/WebKit/UIProcess/API/glib/WebKitDownloadClient.cpp
Log Message:
-----------
[WPE][GTK] API test `TestDownloads` `/webkit/Downloads/local-file-error` 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
More information about the webkit-changes
mailing list