RESOLVED FIXED 127034
Suspend resource requests during computedStyle
https://bugs.webkit.org/show_bug.cgi?id=127034
Summary Suspend resource requests during computedStyle
Antti Koivisto
Reported 2014-01-15 01:25:07 PST
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
Attachments
patch (3.41 KB, patch)
2014-01-15 01:30 PST, Antti Koivisto
kling: review+
Antti Koivisto
Comment 1 2014-01-15 01:25:49 PST
Antti Koivisto
Comment 2 2014-01-15 01:30:39 PST
WebKit Commit Bot
Comment 3 2014-01-15 01:32:22 PST
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.
Andreas Kling
Comment 4 2014-01-15 01:36:28 PST
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
Antti Koivisto
Comment 5 2014-01-15 02:25:02 PST
Note You need to log in before you can comment on or make changes to this bug.