Hi all
Sometimes I met crashes about memory cache, and I traced them and found a bit 
doubt:
Should we use typedef HashMap<String, RefPtr<CachedResource>> 
CachedResourceMap;instead of typedef HashMap<String, CachedResource*> 
CachedResourceMap;?
The following is the call stack, hope it's useful for you:
        WebKit.dll!WebCore::ResourceRequestBase::updateResourceRequest()  
Line447 + 0x37 byte   C++     WebKit.dll!WebCore::ResourceRequestBase::url()  
Line123 C++     WebKit.dll!WebCore::CachedResource::url()  Line106 + 0x19 byte  
C++>    
WebKit.dll!WebCore::CachedResourceLoader::requestResource(WebCore::CachedResource::Type
 type=ImageResource, WebCore::ResourceRequest & request={...}, const 
WTF::String & charset={...}, const WebCore::ResourceLoaderOptions & 
options={...}, WebCore::ResourceLoadPriority priority=-1, bool 
forPreload=false)  Line444 + 0x11 byte   C++     
WebKit.dll!WebCore::CachedResourceLoader::requestImage(WebCore::ResourceRequest 
& request={...})  Line160 + 0x21 byte   C++     
WebKit.dll!WebCore::CSSImageValue::cachedImage(WebCore::CachedResourceLoader * 
loader=0x00e6e6d8, const WTF::String & url={...})  Line90 + 0xf byte     C++    
 WebKit.dll!WebCore::CSSImageValue::cachedImage(WebCore::CachedResourceLoader * 
loader=0x00e6e6d8)  Line79 + 0x19 byte   C++     
WebKit.dll!WebCore::CSSStyleSelector::loadPendingImage(WebCore::StylePendingImage
 * pendingImage=0x0ada6f30)  Line5306 + 0xc byte       C++     
WebKit.dll!WebCore::CSSStyleSelector::loadPendingImages()  Line5331 + 0x15 byte 
C++     WebKit.dll!WebCore::CSSStyleSelector::applyMatchedDeclarations(const 
WebCore::CSSStyleSelector::MatchResult & matchResult={...})  Line2408      C++  
   WebKit.dll!WebCore::CSSStyleSelector::styleForElement(WebCore::Element * 
element=0x0ad08088, WebCore::RenderStyle * defaultParent=0x00000000, bool 
allowSharing=true, bool resolveForRootDefault=false)  Line1310       C++     
WebKit.dll!WebCore::Element::styleForRenderer()  Line1035 + 0x24 byte   C++     
WebKit.dll!WebCore::Element::recalcStyle(WebCore::Node::StyleChange 
change=NoChange)  Line1059 + 0xc byte       C++     
WebKit.dll!WebCore::Element::recalcStyle(WebCore::Node::StyleChange 
change=NoChange)  Line1138  C++     
WebKit.dll!WebCore::Element::recalcStyle(WebCore::Node::StyleChange 
change=NoChange)  Line1138  C++     
WebKit.dll!WebCore::Element::recalcStyle(WebCore::Node::StyleChange 
change=NoChange)  Line1138  C++     
WebKit.dll!WebCore::Element::recalcStyle(WebCore::Node::StyleChange 
change=NoChange)  Line1138  C++     
WebKit.dll!WebCore::Element::recalcStyle(WebCore::Node::StyleChange 
change=NoChange)  Line1138  C++     
WebKit.dll!WebCore::Element::recalcStyle(WebCore::Node::StyleChange 
change=NoChange)  Line1138  C++     
WebKit.dll!WebCore::Element::recalcStyle(WebCore::Node::StyleChange 
change=NoChange)  Line1138  C++     
WebKit.dll!WebCore::Element::recalcStyle(WebCore::Node::StyleChange 
change=NoChange)  Line1138  C++     
WebKit.dll!WebCore::Document::recalcStyle(WebCore::Node::StyleChange 
change=NoChange)  Line1574 C++     
WebKit.dll!WebCore::Document::updateStyleIfNeeded()  Line1634   C++     
WebKit.dll!WebCore::Document::updateLayout()  Line1658 + 0x12 byte      C++
In the function of WebCore::ResourceRequestBase::updateResourceRequest(), the 
point "this" is NOT null, but all of its members are null, so actually it had 
been freed before. So I think the refCount may be helpful to solve this problem.
This is my first time to write to WebKit-dev, it will be appreciated if someone 
could give me some instructions or whether I should file a bug for it?
Thanks in advance!
Best RegardsRock                                          
_______________________________________________
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

Reply via email to