Skip to content
  • bdakin@apple.com's avatar
    WebCore: · b056bbd9
    bdakin@apple.com authored
            Reviewed by Geoff.
    
            Fixed for <rdar://problem/5760530> REGRESSION: Assertion failure in 
            Document::removePendingSheet() from r30438
    
            r30438 added a call to CachedResource::error() from inside 
            Loader::didReceiveData() if a CSS file 4xxs. There was an 
            assumption in the loader, though, that either error() would be 
            called, or didFinishLoading() would be called, so some work is 
            duplicated in each. Now that we are calling an error() on files 
            that will also make it to didFinishLoading() (since they succeeded 
            in the network layer), we need to make sure we do not duplicate the 
            work. CachedCSSStyleSheet::error() calls checkNotify, which ends up 
            decrementing the document's pending style sheet counter. 
            checkNotify() was still getting called, though, through the normal  
            didFinishLoading code path, and the counter was being decremented 
            twice. Bad!
    
            * loader/loader.cpp:
            (WebCore::Loader::didFinishLoading):
            (WebCore::Loader::didReceiveData):
    
    LayoutTests:
    
            Reviewed by Geoff.
    
            Test for <rdar://problem/5760530> REGRESSION: Assertion failure in 
            Document::removePendingSheet() from r30438
    
            * http/tests/misc/missing-style-sheet-expected.txt: Added.
            * http/tests/misc/missing-style-sheet.html: Added.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30587 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    b056bbd9