Changeset 180051 in webkit
- Timestamp:
- Feb 13, 2015, 9:32:14 AM (10 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r180050 r180051 1 2015-02-13 Antti Koivisto <antti@apple.com> 2 3 Add some RELEASE_ASSERTs to try to catch crashes in StyleResolver::loadPendingImages 4 https://bugs.webkit.org/show_bug.cgi?id=141561 5 6 Reviewed by Simon Fraser. 7 8 One possibility is that loads triggered by loadPendingImages end up synchronously destroying or re-entering 9 style resolver. Try to catch these in release builds. 10 11 * css/StyleResolver.cpp: 12 (WebCore::StyleResolver::~StyleResolver): 13 (WebCore::StyleResolver::styleForElement): 14 (WebCore::StyleResolver::styleForKeyframe): 15 (WebCore::StyleResolver::styleForPage): 16 (WebCore::StyleResolver::loadPendingImages): 17 * css/StyleResolver.h: 18 1 19 2015-02-13 ChangSeok Oh <changseok.oh@collabora.com> 2 20 -
trunk/Source/WebCore/css/StyleResolver.cpp
r179791 r180051 141 141 #include <bitset> 142 142 #include <wtf/StdLibExtras.h> 143 #include <wtf/TemporaryChange.h> 143 144 #include <wtf/Vector.h> 144 145 … … 345 346 StyleResolver::~StyleResolver() 346 347 { 348 RELEASE_ASSERT(!m_inLoadPendingImages); 349 347 350 #if ENABLE(CSS_DEVICE_ADAPTATION) 348 351 m_viewportStyleResolver->clearDocument(); … … 741 744 StyleSharingBehavior sharingBehavior, RuleMatchingBehavior matchingBehavior, const RenderRegion* regionForStyling) 742 745 { 746 RELEASE_ASSERT(!m_inLoadPendingImages); 747 743 748 // Once an element has a renderer, we don't try to destroy it, since otherwise the renderer 744 749 // will vanish if a style recalc happens during loading. … … 812 817 Ref<RenderStyle> StyleResolver::styleForKeyframe(const RenderStyle* elementStyle, const StyleKeyframe* keyframe, KeyframeValue& keyframeValue) 813 818 { 819 RELEASE_ASSERT(!m_inLoadPendingImages); 820 814 821 MatchResult result; 815 822 result.addMatchedProperties(keyframe->properties()); … … 979 986 Ref<RenderStyle> StyleResolver::styleForPage(int pageIndex) 980 987 { 988 RELEASE_ASSERT(!m_inLoadPendingImages); 989 981 990 m_state.initForStyleResolve(m_document, m_document.documentElement(), m_document.renderStyle()); 982 991 … … 2429 2438 void StyleResolver::loadPendingImages() 2430 2439 { 2440 RELEASE_ASSERT(!m_inLoadPendingImages); 2441 TemporaryChange<bool> { m_inLoadPendingImages, true }; 2442 2431 2443 if (m_state.pendingImageProperties().isEmpty()) 2432 2444 return; -
trunk/Source/WebCore/css/StyleResolver.h
r179119 r180051 526 526 State m_state; 527 527 528 // Try to catch a crash. https://bugs.webkit.org/show_bug.cgi?id=141561. 529 bool m_inLoadPendingImages { false }; 530 528 531 friend bool operator==(const MatchedProperties&, const MatchedProperties&); 529 532 friend bool operator!=(const MatchedProperties&, const MatchedProperties&);
Note:
See TracChangeset
for help on using the changeset viewer.