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: https://svn.webkit.org/repository/webkit/trunk@30587
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2008-02-25 Beth Dakin <bdakin@apple.com>
+
+ 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.
+
2008-02-25 Brady Eidson <beidson@apple.com>
Reviewed by T3h Mitz Pettel (Dan Bernstein)
--- /dev/null
+This test passes if it does not ASSERT that the document's pending style sheet count is less than 0.
--- /dev/null
+<script>
+ if (window.layoutTestController)
+ layoutTestController.dumpAsText();
+</script>
+
+<link href="/adeleandbethrock.css" rel="stylesheet" type="text/css">
+
+This test passes if it does not ASSERT that the document's pending style sheet count is less than 0.
+
\ No newline at end of file
+2008-02-25 Beth Dakin <bdakin@apple.com>
+
+ 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):
+
2008-02-25 Mark Rowe <mrowe@apple.com>
Fix the Gtk, wx and Qt builds.
0867D690FE84028FC02AAC07 /* Project object */ = {
isa = PBXProject;
buildConfigurationList = 149C284308902B11008A9EFC /* Build configuration list for PBXProject "WebCore" */;
+ compatibilityVersion = "Xcode 2.4";
hasScannedForEncodings = 1;
knownRegions = (
English,
mainGroup = 0867D691FE84028FC02AAC07 /* WebKit */;
productRefGroup = 034768DFFF38A50411DB9C8B /* Products */;
projectDirPath = "";
+ projectRoot = "";
targets = (
93F198A508245E59001E9ABC /* WebCore */,
DD041FBE09D9DDBE0010AF2A /* Derived Sources */,
CachedResource* object = req->cachedResource();
- docLoader->setLoadInProgress(true);
- object->data(loader->resourceData(), true);
- docLoader->setLoadInProgress(false);
- object->finish();
+ // If we got a 4xx response, we're pretending to have received a network
+ // error, so we can't send the successful data() and finish() callbacks.
+ if (!object->errorOccurred()) {
+ docLoader->setLoadInProgress(true);
+ object->data(loader->resourceData(), true);
+ docLoader->setLoadInProgress(false);
+ object->finish();
+ }
delete req;
return;
if (object->response().httpStatusCode() / 100 == 4) {
- // Make sure the 4xx error codes result in an error.
+ // Treat a 4xx response like a network error.
object->error();
return;
}