Changeset 61316 in webkit
- Timestamp:
- Jun 17, 2010 2:29:23 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r61315 r61316 1 2010-06-17 John Gregg <johnnyg@google.com> 2 3 Reviewed by David Levin. 4 5 Move the call to the notification presenter that a Notification is being 6 destroyed from the destructor (not safe) to the ActiveDOMObject::contextDestroyed 7 method. 8 9 Also fix up an incorrect reference loss in the V8 bindings code for Notifications. 10 https://bugs.webkit.org/show_bug.cgi?id=40097 11 12 No new tests; code paths are well-covered by existing tests. 13 14 * bindings/v8/custom/V8NotificationCenterCustom.cpp: 15 (WebCore::V8NotificationCenter::createHTMLNotificationCallback): 16 (WebCore::V8NotificationCenter::createNotificationCallback): 17 * notifications/Notification.cpp: 18 (WebCore::Notification::~Notification): 19 (WebCore::Notification::contextDestroyed): 20 * notifications/Notification.h: 21 1 22 2010-06-17 Csaba Osztrogonác <ossy@webkit.org> 2 23 -
trunk/WebCore/bindings/v8/custom/V8NotificationCenterCustom.cpp
r60330 r61316 59 59 return throwError(ec); 60 60 61 notification->ref(); 61 62 return toV8(notification.get()); 62 63 } … … 73 74 return throwError(ec); 74 75 76 notification->ref(); 75 77 return toV8(notification.get()); 76 78 } -
trunk/WebCore/notifications/Notification.cpp
r61121 r61316 91 91 cancel(); 92 92 } 93 if (m_presenter)94 m_presenter->notificationObjectDestroyed(this);95 93 } 96 94 … … 141 139 } 142 140 141 void Notification::contextDestroyed() 142 { 143 ActiveDOMObject::contextDestroyed(); 144 if (m_presenter) 145 m_presenter->notificationObjectDestroyed(this); 146 } 143 147 144 148 void Notification::startLoading() -
trunk/WebCore/notifications/Notification.h
r61121 r61316 88 88 virtual Notification* toNotification() { return this; } 89 89 90 // ActiveDOMObject interface 91 virtual void contextDestroyed(); 92 90 93 void stopLoading(); 91 94 -
trunk/WebKit/chromium/ChangeLog
r61299 r61316 1 2010-06-17 John Gregg <johnnyg@google.com> 2 3 Reviewed by David Levin. 4 5 Undo the build fix with the correct patch: Chromium NotificationPresenter 6 is now informed of the destruction before it actually happens, so this 7 use of the Notification object is correct. 8 https://bugs.webkit.org/show_bug.cgi?id=40097 9 10 * src/NotificationPresenterImpl.cpp: 11 (WebKit::NotificationPresenterImpl::notificationObjectDestroyed): 12 1 13 2010-06-16 Kent Tamura <tkent@chromium.org> 2 14 -
trunk/WebKit/chromium/src/NotificationPresenterImpl.cpp
r60590 r61316 89 89 void NotificationPresenterImpl::notificationObjectDestroyed(Notification* notification) 90 90 { 91 // TODO(pkasting): We cannot ref an object that's being destroyed. Either 92 // this function needs to be called earlier than in ~Notification(), or it 93 // needs to not ref this object. 94 //m_presenter->objectDestroyed(PassRefPtr<Notification>(notification)); 91 m_presenter->objectDestroyed(PassRefPtr<Notification>(notification)); 95 92 } 96 93
Note: See TracChangeset
for help on using the changeset viewer.