summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorViktor Engelmann <viktor.engelmann@qt.io>2017-01-04 12:41:02 +0100
committerViktor Engelmann <viktor.engelmann@qt.io>2017-01-05 09:37:20 +0000
commit6541025ebc76bafdcdb38da5c05708df14406396 (patch)
tree2978cf552739bf905df785216314ebd0c021fd6b
parentee6a121d95423e64bae5e1eecc7fc907525a265b (diff)
Replace ASSERT in FaviconManager::setIcon by return
The ASSERT in FaviconManager::setIcon can be triggered by what seems to be a race condition. Apparently the old request can be gone (so m_inProgressRequests.contains(id) is false), but m_inProgressRequests can still be non-empty, because of a new request to the same URL, so this case is not covered by checking m_inProgressRequests.isEmpty() before. Task-number: QTBUG-57900 Change-Id: I2f26c05e5c97e4bd8d1cea03e8005cf61f2b0c98 Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
-rw-r--r--src/core/favicon_manager.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/core/favicon_manager.cpp b/src/core/favicon_manager.cpp
index be8d17725..214fd5fa7 100644
--- a/src/core/favicon_manager.cpp
+++ b/src/core/favicon_manager.cpp
@@ -138,11 +138,9 @@ void FaviconManagerPrivate::storeIcon(int id, const QIcon &icon)
Q_Q(FaviconManager);
// Icon download has been interrupted
- if (m_inProgressRequests.isEmpty())
+ if (!m_inProgressRequests.contains(id))
return;
- Q_ASSERT(m_inProgressRequests.contains(id));
-
QUrl requestUrl = m_inProgressRequests[id];
FaviconInfo &faviconInfo = q->m_faviconInfoMap[requestUrl];