summaryrefslogtreecommitdiffstats
path: root/src/webenginewidgets/api/qwebengineprofile_p.h
diff options
context:
space:
mode:
authorKirill Burtsev <kirill.burtsev@qt.io>2019-02-11 19:21:03 +0100
committerKirill Burtsev <kirill.burtsev@qt.io>2019-02-19 15:30:44 +0000
commit7537526093c92e89672d1e952a9baceecaa91730 (patch)
treedcb37c57802b90eff5835f54f13ef6a8db059ac7 /src/webenginewidgets/api/qwebengineprofile_p.h
parent755f7e414583c5458c2d421d047a1c7890c8d8d2 (diff)
Remove download properly on profile destruction to avoid use after free
In the Widgets API, download items are children of the profile and are destroyed when the parent profile destroys its children. The download item's destructor can therefore not access the profile, as it would cause a heap-use-after-free crashes. On quick side turn ongoing downloads cleanup to match widgets one. Fixes: QTBUG-73839 Change-Id: Iabb379e91187e3e68ebcd4693fec35883b72b1f2 Reviewed-by: Michael Brüning <michael.bruning@qt.io> Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
Diffstat (limited to 'src/webenginewidgets/api/qwebengineprofile_p.h')
-rw-r--r--src/webenginewidgets/api/qwebengineprofile_p.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/webenginewidgets/api/qwebengineprofile_p.h b/src/webenginewidgets/api/qwebengineprofile_p.h
index 9ff8df849..4a76f457f 100644
--- a/src/webenginewidgets/api/qwebengineprofile_p.h
+++ b/src/webenginewidgets/api/qwebengineprofile_p.h
@@ -81,6 +81,8 @@ public:
void downloadDestroyed(quint32 downloadId);
+ void cleanDownloads();
+
void downloadRequested(DownloadItemInfo &info) override;
void downloadUpdated(const DownloadItemInfo &info) override;