Changeset 27585 in webkit
- Timestamp:
- Nov 7, 2007 5:54:14 PM (16 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r27583 r27585 1 2007-11-07 Dan Bernstein <mitz@apple.com> 2 3 Reviewed by Darin Adler. 4 5 - fix <rdar://problem/5523503> Safari crashes clicking scroll bar in FaceBook 'Trips' 6 7 Layers and listboxes are two kinds of ScrollBarClient that can be 8 removed while the scrollbar is tracking the mouse. The scrollbar is not 9 destroyed until later, and meanwhile it can try to call the client, 10 which results in a crash. 11 12 * manual-tests/stale-scrollbar-client-crash.html: Added. 13 * platform/ScrollBar.h: 14 (WebCore::Scrollbar::setClient): Added. 15 * rendering/RenderLayer.cpp: 16 (WebCore::RenderLayer::destroyScrollbar): Call Scrollbar::setClient(). 17 * rendering/RenderListBox.cpp: 18 (WebCore::RenderListBox::~RenderListBox): Ditto. 19 1 20 2007-11-07 Adam Roben <aroben@apple.com> 2 21 -
trunk/WebCore/platform/ScrollBar.h
r20761 r27585 60 60 virtual ~Scrollbar() {} 61 61 62 void setClient(ScrollbarClient* client) { m_client = client; } 63 62 64 virtual bool isWidget() const = 0; 63 65 -
trunk/WebCore/rendering/RenderLayer.cpp
r27277 r27585 1026 1026 if (scrollbar->isWidget()) 1027 1027 static_cast<PlatformScrollbar*>(scrollbar.get())->removeFromParent(); 1028 scrollbar->setClient(0); 1028 1029 1029 1030 // FIXME: Destroy the engine scrollbar. -
trunk/WebCore/rendering/RenderListBox.cpp
r26614 r27585 80 80 RenderListBox::~RenderListBox() 81 81 { 82 if (m_vBar && m_vBar->isWidget()) 83 if (FrameView* view = node()->document()->view()) 84 view->removeChild(static_cast<PlatformScrollbar*>(m_vBar.get())); 82 if (m_vBar) { 83 if (m_vBar->isWidget()) { 84 if (FrameView* view = node()->document()->view()) 85 view->removeChild(static_cast<PlatformScrollbar*>(m_vBar.get())); 86 } 87 m_vBar->setClient(0); 88 } 85 89 } 86 90
Note: See TracChangeset
for help on using the changeset viewer.