Changeset 97643 in webkit
- Timestamp:
- Oct 17, 2011, 1:46:29 PM (14 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r97641 r97643 1 2011-10-17 Dmitry Titov <dimich@chromium.org> 2 3 window.webkitNotifications uses deallocated NotificationPresenter after live Iframe transfer. 4 https://bugs.webkit.org/show_bug.cgi?id=70147 5 6 Reviewed by David Levin. 7 8 I only found a way to test this manually, since Chromium TestShell uses static instance 9 of NotificationPresenter instead of per-page one so the issue does not reproduce. 10 Adding manual test that works in full build of Chromium. 11 12 * manual-tests/iframe_notifications/iframe-reparenting-close-window-child.html: Added. 13 * manual-tests/iframe_notifications/iframe-reparenting-close-window-iframe.html: Added. 14 * manual-tests/iframe_notifications/iframe-reparenting-close-window.html: Added. 15 * notifications/NotificationCenter.cpp: 16 (WebCore::NotificationCenter::disconnectFrame): 17 * page/DOMWindow.cpp: 18 (WebCore::DOMWindow::resetNotifications): 19 * page/DOMWindow.h: 20 * page/Frame.cpp: 21 (WebCore::Frame::transferChildFrameToNewDocument): reset webkitNotifications object. 22 1 23 2011-10-17 Jeff Miller <jeffm@apple.com> 2 24 -
trunk/Source/WebCore/notifications/NotificationCenter.cpp
r95901 r97643 62 62 void NotificationCenter::disconnectFrame() 63 63 { 64 // m_notificationPresenter should never be 0. But just to be safe, we check it here. 65 // Due to the mysterious bug http://code.google.com/p/chromium/issues/detail?id=49323. 66 ASSERT(m_notificationPresenter); 64 // Can be 0 if iframe was transferred into another page. In this case 65 // this method is invoked more then once. 67 66 if (!m_notificationPresenter) 68 67 return; -
trunk/Source/WebCore/page/DOMWindow.cpp
r97574 r97643 749 749 return m_notifications.get(); 750 750 } 751 752 void DOMWindow::resetNotifications() 753 { 754 m_notifications->disconnectFrame(); 755 } 751 756 #endif 752 757 -
trunk/Source/WebCore/page/DOMWindow.h
r97574 r97643 381 381 #if ENABLE(NOTIFICATIONS) 382 382 NotificationCenter* webkitNotifications() const; 383 // Renders webkitNotifications object safely inoperable, disconnects 384 // if from embedder-provided NotificationPresenter. 385 void resetNotifications(); 383 386 #endif 384 387 -
trunk/Source/WebCore/page/Frame.cpp
r97571 r97643 747 747 // See https://bugs.webkit.org/show_bug.cgi?id=55577 748 748 // and https://bugs.webkit.org/show_bug.cgi?id=52877 749 if (m_domWindow) 749 if (m_domWindow) { 750 750 m_domWindow->resetGeolocation(); 751 #if ENABLE(NOTIFICATIONS) 752 m_domWindow->resetNotifications(); 753 #endif 754 } 751 755 752 756 #if ENABLE(MEDIA_STREAM)
Note:
See TracChangeset
for help on using the changeset viewer.