Bug 43414

Summary: Web Inspector: use InspectorValue to push resource data to the frontend
Product: WebKit Reporter: Yury Semikhatsky <yurys>
Component: Web Inspector (Deprecated)Assignee: Yury Semikhatsky <yurys>
Status: RESOLVED FIXED    
Severity: Normal CC: bweinstein, joepeck, keishi, loislo, mitz, pfeldman, pmuellr, rik, timothy, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch none

Description Yury Semikhatsky 2010-08-03 05:31:52 PDT
Web Inspector: use InspectorValue to push resource data to the frontend
Comment 1 Yury Semikhatsky 2010-08-03 05:39:58 PDT
Created attachment 63328 [details]
Patch
Comment 2 Yury Semikhatsky 2010-08-03 06:07:28 PDT
Comment on attachment 63328 [details]
Patch

Clearing flags on attachment: 63328

Committed r64547: <http://trac.webkit.org/changeset/64547>
Comment 3 Yury Semikhatsky 2010-08-03 06:07:38 PDT
All reviewed patches have been landed.  Closing bug.
Comment 4 mitz 2010-10-02 14:10:24 PDT
r64547 caused a reproducible crash when loading certain pages with the Web Inspector open and resource tracking turned on. A backtrace looks like this, showing script execution beneath attach() and in particular, initForStyleResolve() clearing m_pendingImageProperties while loadPendingImages() is iterating over it:

#0	0x102c07827 in WebCore::CSSStyleSelector::initForStyleResolve at CSSStyleSelector.cpp:846
#1	0x102be796b in WebCore::CSSStyleSelector::styleForElement at CSSStyleSelector.cpp:1162
#2	0x102d820fe in WebCore::Element::recalcStyle at Element.cpp:931
#3	0x102d8279a in WebCore::Element::recalcStyle at Element.cpp:999
#4	0x102d8279a in WebCore::Element::recalcStyle at Element.cpp:999
#5	0x102d8279a in WebCore::Element::recalcStyle at Element.cpp:999
#6	0x102d8279a in WebCore::Element::recalcStyle at Element.cpp:999
#7	0x102d8279a in WebCore::Element::recalcStyle at Element.cpp:999
#8	0x102d8279a in WebCore::Element::recalcStyle at Element.cpp:999
#9	0x102d8279a in WebCore::Element::recalcStyle at Element.cpp:999
#10	0x102c5a851 in WebCore::Document::recalcStyle at Document.cpp:1492
#11	0x102c5a554 in WebCore::Document::updateStyleIfNeeded at Document.cpp:1536
#12	0x102c53722 in WebCore::Document::updateStyleForAllDocuments at Document.cpp:1552
#13	0x1034f5ca6 in WebCore::ScriptController::executeScript at ScriptControllerBase.cpp:64
#14	0x1034f5d77 in WebCore::ScriptController::executeScript at ScriptControllerBase.cpp:49
#15	0x1024f9f5b in WebInspectorClient::sendMessageToFrontend at WebInspectorClientCF.cpp:119
#16	0x102fe384d in WebCore::InspectorFrontend::updateResource at InspectorFrontend.cpp:314
#17	0x102ff09ca in WebCore::InspectorResource::updateScriptObject at InspectorResource.cpp:335
#18	0x102f8f20d in WebCore::InspectorController::didLoadResourceFromMemoryCache at InspectorController.cpp:932
#19	0x102df2198 in WebCore::FrameLoader::loadedResourceFromMemoryCache at FrameLoader.cpp:3026
#20	0x102adae8c in WebCore::CachedResourceLoader::checkCacheObjectStatus at CachedResourceLoader.cpp:364
#21	0x102adb9e1 in WebCore::CachedResourceLoader::requestResource at CachedResourceLoader.cpp:274
#22	0x102adbc80 in WebCore::CachedResourceLoader::requestImage at CachedResourceLoader.cpp:137
#23	0x102b7861d in WebCore::CSSImageValue::cachedImage at CSSImageValue.cpp:74
#24	0x102b7872b in WebCore::CSSImageValue::cachedImage at CSSImageValue.cpp:64
#25	0x102bc29be in WebCore::CSSStyleSelector::loadPendingImages at CSSStyleSelector.cpp:6853
#26	0x102be8486 in WebCore::CSSStyleSelector::styleForElement at CSSStyleSelector.cpp:1354
#27	0x10330ea29 in WebCore::Node::styleForRenderer at Node.cpp:1358
#28	0x10330ebc1 in WebCore::Node::createRendererIfNeeded at Node.cpp:1335
#29	0x102d82891 in WebCore::Element::attach at Element.cpp:845
#30	0x102e903ed in WebCore::HTMLConstructionSite::attach<WebCore::Element> at HTMLConstructionSite.cpp:111
#31	0x102e8e8ac in WebCore::HTMLConstructionSite::attachToCurrent at HTMLConstructionSite.cpp:234
#32	0x102e8ed24 in WebCore::HTMLConstructionSite::insertHTMLElement at HTMLConstructionSite.cpp:271
#33	0x102f11bea in WebCore::HTMLTreeBuilder::processStartTagForInBody at HTMLTreeBuilder.cpp:772
#34	0x102f0a6dd in WebCore::HTMLTreeBuilder::processStartTag at HTMLTreeBuilder.cpp:1201
#35	0x102f09e81 in WebCore::HTMLTreeBuilder::processToken at HTMLTreeBuilder.cpp:457
#36	0x102f13201 in WebCore::HTMLTreeBuilder::constructTreeFromAtomicToken at HTMLTreeBuilder.cpp:438
#37	0x102f132c2 in WebCore::HTMLTreeBuilder::constructTreeFromToken at HTMLTreeBuilder.cpp:433
#38	0x102e9417e in WebCore::HTMLDocumentParser::pumpTokenizer at HTMLDocumentParser.cpp:223
#39	0x102e9447a in WebCore::HTMLDocumentParser::pumpTokenizerIfPossible at HTMLDocumentParser.cpp:172
#40	0x102e94531 in WebCore::HTMLDocumentParser::resumeParsingAfterScriptExecution at HTMLDocumentParser.cpp:434
#41	0x102e946c6 in WebCore::HTMLDocumentParser::executeScriptsWaitingForStylesheets at HTMLDocumentParser.cpp:505
#42	0x102c5cae1 in WebCore::Document::removePendingSheet at Document.cpp:2791
#43	0x102ecf7a2 in WebCore::HTMLLinkElement::sheetLoaded at HTMLLinkElement.cpp:341
#44	0x102c09080 in WebCore::CSSStyleSheet::checkLoaded at CSSStyleSheet.cpp:214
#45	0x102b79f17 in WebCore::CSSImportRule::setCSSStyleSheet at CSSImportRule.cpp:104
#46	0x102ace69d in WebCore::CachedCSSStyleSheet::checkNotify at CachedCSSStyleSheet.cpp:117
#47	0x102ace6ed in WebCore::CachedCSSStyleSheet::error at CachedCSSStyleSheet.cpp:124
#48	0x102aced62 in WebCore::CachedResource::httpStatusCodeError at CachedResource.h:87
#49	0x1032c1552 in WebCore::Loader::Host::didReceiveData at loader.cpp:549
#50	0x103580c67 in WebCore::SubresourceLoader::didReceiveData at SubresourceLoader.cpp:158
#51	0x1034d165d in WebCore::ResourceLoader::didReceiveData at ResourceLoader.cpp:434