Changeset 60630 in webkit


Ignore:
Timestamp:
Jun 3, 2010 10:34:48 AM (14 years ago)
Author:
yael.aharon@nokia.com
Message:

[Qt] Don't send notifications event after the page was navigated away
https://bugs.webkit.org/show_bug.cgi?id=40127

Reviewed by Laszlo Gombos.

Added a check before sending events to the notification and before logging.

  • WebCoreSupport/NotificationPresenterClientQt.cpp:

(WebCore::NotificationPresenterClientQt::cancel):
(WebCore::NotificationPresenterClientQt::sendEvent):

Location:
trunk/WebKit/qt
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit/qt/ChangeLog

    r60609 r60630  
     12010-06-03  Yael Aharon  <yael.aharon@nokia.com>
     2
     3        Reviewed by Laszlo Gombos.
     4
     5        [Qt] Don't send notifications event after the page was navigated away
     6        https://bugs.webkit.org/show_bug.cgi?id=40127
     7
     8        Added a check before sending events to the notification and before logging.
     9
     10        * WebCoreSupport/NotificationPresenterClientQt.cpp:
     11        (WebCore::NotificationPresenterClientQt::cancel):
     12        (WebCore::NotificationPresenterClientQt::sendEvent):
     13
    1142010-06-02  Tasuku Suzuki  <tasuku.suzuki@nokia.com>
    215
  • trunk/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp

    r60566 r60630  
    144144void NotificationPresenterClientQt::cancel(Notification* notification)
    145145{
    146     if (dumpNotification) {
     146    if (dumpNotification && notification->scriptExecutionContext()) {
    147147        if (notification->isHTML())
    148148            printf("DESKTOP NOTIFICATION CLOSED: %s\n", QString(notification->url().string()).toUtf8().constData());
     
    227227void NotificationPresenterClientQt::sendEvent(Notification* notification, const AtomicString& eventName)
    228228{
    229     notification->dispatchEvent(Event::create(eventName, false, true));
     229    if (notification->scriptExecutionContext())
     230        notification->dispatchEvent(Event::create(eventName, false, true));
    230231}
    231232
Note: See TracChangeset for help on using the changeset viewer.