2010-08-20 Abhishek Arya <inferno@chromium.org>
authorinferno <inferno@chromium.org>
Fri, 20 Aug 2010 18:00:21 +0000 (18:00 +0000)
committerAdemar de Souza Reis Jr <ademar.reis@openbossa.org>
Wed, 13 Apr 2011 17:56:17 +0000 (14:56 -0300)
commit4acb6bf1c9e3229c3562dfa4dfe12f4f0ae9f7d1
tree47f98a5f8d754b0feee34360e2d16a7b02b3414d
parentf45d42188432a78331e9fa5733863752ea81f64e
2010-08-20  Abhishek Arya  <inferno@chromium.org>

        Reviewed by Darin Fisher.

        Prevent use of stale notification presenter pointer in notifications by instead using
        a notification center pointer and deriving the presenter from it. Notification presenter
        gets properly destroyed using disconnectFrame function inside notification center. Add
        null checks for notification presenter.
        https://bugs.webkit.org/show_bug.cgi?id=43645

        Test: fast/notifications/notifications-window-close-crash.html

        * notifications/Notification.cpp:
        (WebCore::Notification::Notification):
        (WebCore::Notification::create):
        (WebCore::Notification::show):
        (WebCore::Notification::cancel):
        (WebCore::Notification::contextDestroyed):
        (WebCore::Notification::finishLoading):
        * notifications/Notification.h:
        (WebCore::Notification::detachPresenter):
        * notifications/NotificationCenter.h:
        (WebCore::NotificationCenter::createHTMLNotification):
        (WebCore::NotificationCenter::createNotification):
2010-08-20  Abhishek Arya  <inferno@chromium.org>

        Reviewed by Darin Fisher.

        Manual test to check that canceling the notification on a closed window does
        not result in crash.
        https://bugs.webkit.org/show_bug.cgi?id=43645

        * fast/notifications/notifications-window-close-crash-expected.txt: Added.
        * fast/notifications/notifications-window-close-crash.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65742 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/notifications/notifications-window-close-crash-expected.txt [new file with mode: 0644]
LayoutTests/fast/notifications/notifications-window-close-crash.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/notifications/Notification.cpp
WebCore/notifications/Notification.h
WebCore/notifications/NotificationCenter.h