Changeset 60547 in webkit
- Timestamp:
- Jun 2, 2010 1:45:41 AM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r60546 r60547 1 2010-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 1 20 2010-06-02 Qi Zhang <qi.2.zhang@nokia.com> 2 21 -
trunk/WebCore/notifications/Notification.h
r60193 r60547 56 56 class Notification : public RefCounted<Notification>, public ActiveDOMObject, public EventTarget { 57 57 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)); } 60 60 61 61 virtual ~Notification(); -
trunk/WebCore/notifications/NotificationCenter.h
r57604 r60547 50 50 static PassRefPtr<NotificationCenter> create(ScriptExecutionContext* context, NotificationPresenter* presenter) { return adoptRef(new NotificationCenter(context, presenter)); } 51 51 52 Notification*createHTMLNotification(const String& URI, ExceptionCode& ec)52 PassRefPtr<Notification> createHTMLNotification(const String& URI, ExceptionCode& ec) 53 53 { 54 54 if (!presenter()) { … … 63 63 } 64 64 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) 66 66 { 67 67 if (!presenter()) {
Note: See TracChangeset
for help on using the changeset viewer.