summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Source/WebKit/qt/ChangeLog13
-rw-r--r--Source/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp7
2 files changed, 17 insertions, 3 deletions
diff --git a/Source/WebKit/qt/ChangeLog b/Source/WebKit/qt/ChangeLog
index 0557e66fe..f03960ceb 100644
--- a/Source/WebKit/qt/ChangeLog
+++ b/Source/WebKit/qt/ChangeLog
@@ -1,3 +1,16 @@
+2013-01-21 Allan Sandfeld Jensen <allan.jensen@digia.com>
+
+ [Qt] Crash in gmail on enabling desktop notifications
+ https://bugs.webkit.org/show_bug.cgi?id=106699
+
+ Patch by David Rosca.
+ Reviewed by Jocelyn Turcotte.
+
+ Protect against callback that may be null. This also matches WebKit2 behaviour.
+
+ * WebCoreSupport/NotificationPresenterClientQt.cpp:
+ (WebCore::NotificationPresenterClientQt::allowNotificationForFrame):
+
2013-01-21 Jocelyn Turcotte <jocelyn.turcotte@digia.com>
[Qt] Update the documentation about the storage of inspector settings
diff --git a/Source/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp b/Source/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp
index 06840c455..2f25b8960 100644
--- a/Source/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp
+++ b/Source/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp
@@ -367,8 +367,10 @@ void NotificationPresenterClientQt::allowNotificationForFrame(Frame* frame)
return;
QList<RefPtr<VoidCallback> >& callbacks = iter.value().m_callbacks;
- for (int i = 0; i < callbacks.size(); i++)
- callbacks.at(i)->handleEvent();
+ Q_FOREACH(const RefPtr<VoidCallback>& callback, callbacks) {
+ if (callback)
+ callback->handleEvent();
+ }
m_pendingPermissionRequests.remove(iter.key());
}
@@ -379,7 +381,6 @@ void NotificationPresenterClientQt::sendDisplayEvent(NotificationWrapper* wrappe
sendEvent(notification, "show");
}
-
void NotificationPresenterClientQt::sendEvent(Notification* notification, const AtomicString& eventName)
{
if (notification->scriptExecutionContext())