We have some cases where getting computed style leads to crashes in loadPendingImages. This is probably caused by load callbacks triggering re-entering webkit and killing the StyleResolver. (lldb) bt * thread #5: tid = 0x2403, 0x00720078 UIKit`.str44 + 636054, stop reason = EXC_BAD_ACCESS (code=13, address=0x0) frame #0: 0x00720078 UIKit`.str44 + 636054 frame #1: 0x03400532 WebCore`WebCore::StyleResolver::loadPendingImages() + 802 frame #2: 0x033f80f9 WebCore`WebCore::StyleResolver::applyMatchedProperties(WebCore::StyleResolver::MatchResult const&) + 1097 frame #3: 0x033f2bf1 WebCore`WebCore::StyleResolver::styleForElement(WebCore::Element*, WebCore::RenderStyle*, WebCore::StyleSharingBehavior, WebCore::RuleMatchingBehavior, WebCore::RenderRegion*) + 3489 frame #4: 0x02a3b180 WebCore`WebCore::Document::styleForElementIgnoringPendingStylesheets(WebCore::Element*) + 144 frame #5: 0x02b141b9 WebCore`WebCore::Element::computedStyle(WebCore::PseudoId) + 121 frame #6: 0x0296e14f WebCore`WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue(WebCore::CSSPropertyID, WebCore::EUpdateLayout) const + 479 frame #7: 0x0296dc1f WebCore`WebCore::CSSComputedStyleDeclaration::getPropertyValue(WebCore::CSSPropertyID) const + 47 frame #8: 0x02986a88 WebCore`WebCore::CSSComputedStyleDeclaration::getPropertyValue(WTF::String const&) + 56 frame #9: 0x02e0e997
<rdar://problem/12369267>
Created attachment 221240 [details] patch
Attachment 221240 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCore/dom/Document.cpp', u'Source/WebCore/loader/ResourceLoadScheduler.h', '--commit-queue']" exit_code: 1 ERROR: Source/WebCore/loader/ResourceLoadScheduler.h:67: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] Total errors found: 1 in 3 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 221240 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=221240&action=review r=me.. > Source/WebCore/loader/ResourceLoadScheduler.h:65 > + class Suspend { This name feels a bit off. "Suspender"? > Source/WebCore/loader/ResourceLoadScheduler.h:67 > + Suspend(ResourceLoadScheduler& scheduler) : m_scheduler(scheduler) { m_scheduler.suspendPendingRequests(); } explicit
https://trac.webkit.org/r162063