Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(258)

Unified Diff: Source/WebCore/rendering/RenderScrollbar.cpp

Issue 8028035: Merge 95074 - Crash in RenderScrollbarPart::imageChanged. (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/835/
Patch Set: Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/scrollbars/scrollbar-part-created-with-no-parent-crash-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/rendering/RenderScrollbar.cpp
===================================================================
--- Source/WebCore/rendering/RenderScrollbar.cpp (revision 95979)
+++ Source/WebCore/rendering/RenderScrollbar.cpp (working copy)
@@ -64,7 +64,15 @@
RenderScrollbar::~RenderScrollbar()
{
- ASSERT(m_parts.isEmpty());
+ if (!m_parts.isEmpty()) {
+ // When a scrollbar is detached from its parent (causing all parts removal) and
+ // ready to be destroyed, its destruction can be delayed because of RefPtr
+ // maintained in other classes such as EventHandler (m_lastScrollbarUnderMouse).
+ // Meanwhile, we can have a call to updateScrollbarPart which recreates the
+ // scrollbar part. So, we need to destroy these parts since we don't want them
+ // to call on a destroyed scrollbar. See webkit bug 68009.
+ updateScrollbarParts(true);
+ }
}
RenderBox* RenderScrollbar::owningRenderer() const
« no previous file with comments | « LayoutTests/scrollbars/scrollbar-part-created-with-no-parent-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698