Changeset 60547 in webkit


Ignore:
Timestamp:
Jun 2, 2010 1:45:41 AM (14 years ago)
Author:
eric@webkit.org
Message:

2010-06-02 Yael Aharon <yael.aharon@nokia.com>

Reviewed by Darin Adler.

Notification object ref counting is not correct.
https://bugs.webkit.org/show_bug.cgi?id=39998

Return PassRefPtr<Notification> instead of a raw pointer from the create methods
for Web Notifications.

No new tests are needed, as existing tests show the problem when sending the
"display" event asynchronously.

  • notifications/Notification.h: (WebCore::Notification::create):
  • notifications/NotificationCenter.h: (WebCore::NotificationCenter::createHTMLNotification): (WebCore::NotificationCenter::createNotification):
Location:
trunk/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r60546 r60547  
     12010-06-02  Yael Aharon  <yael.aharon@nokia.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        Notification object ref counting is not correct.
     6        https://bugs.webkit.org/show_bug.cgi?id=39998
     7
     8        Return PassRefPtr<Notification> instead of a raw pointer from the create methods
     9        for Web Notifications.
     10
     11        No new tests are needed, as existing tests show the problem when sending the
     12        "display" event asynchronously.
     13
     14        * notifications/Notification.h:
     15        (WebCore::Notification::create):
     16        * notifications/NotificationCenter.h:
     17        (WebCore::NotificationCenter::createHTMLNotification):
     18        (WebCore::NotificationCenter::createNotification):
     19
    1202010-06-02  Qi Zhang  <qi.2.zhang@nokia.com>
    221
  • trunk/WebCore/notifications/Notification.h

    r60193 r60547  
    5656    class Notification : public RefCounted<Notification>, public ActiveDOMObject, public EventTarget {
    5757    public:
    58         static Notification* create(const KURL& url, ScriptExecutionContext* context, ExceptionCode& ec, NotificationPresenter* provider) { return new Notification(url, context, ec, provider); }
    59         static Notification* create(const NotificationContents& contents, ScriptExecutionContext* context, ExceptionCode& ec, NotificationPresenter* provider) { return new Notification(contents, context, ec, provider); }
     58        static PassRefPtr<Notification> create(const KURL& url, ScriptExecutionContext* context, ExceptionCode& ec, NotificationPresenter* provider) { return adoptRef(new Notification(url, context, ec, provider)); }
     59        static PassRefPtr<Notification> create(const NotificationContents& contents, ScriptExecutionContext* context, ExceptionCode& ec, NotificationPresenter* provider) { return adoptRef(new Notification(contents, context, ec, provider)); }
    6060       
    6161        virtual ~Notification();
  • trunk/WebCore/notifications/NotificationCenter.h

    r57604 r60547  
    5050        static PassRefPtr<NotificationCenter> create(ScriptExecutionContext* context, NotificationPresenter* presenter) { return adoptRef(new NotificationCenter(context, presenter)); }
    5151
    52         Notification* createHTMLNotification(const String& URI, ExceptionCode& ec)
     52        PassRefPtr<Notification> createHTMLNotification(const String& URI, ExceptionCode& ec)
    5353        {
    5454            if (!presenter()) {
     
    6363        }
    6464
    65         Notification* createNotification(const String& iconURI, const String& title, const String& body, ExceptionCode& ec)
     65        PassRefPtr<Notification> createNotification(const String& iconURI, const String& title, const String& body, ExceptionCode& ec)
    6666        {
    6767            if (!presenter()) {
Note: See TracChangeset for help on using the changeset viewer.