Commit 27d903c9 authored by andersca@apple.com's avatar andersca@apple.com

WebCore:

2008-05-14  Anders Carlsson  <andersca@apple.com>

        Reviewed by Adam.

        Don't try to store the resource data if it's empty.
        
        * loader/appcache/ApplicationCacheStorage.cpp:
        (WebCore::ApplicationCacheStorage::store):

LayoutTests:

2008-05-14  Anders Carlsson  <andersca@apple.com>

        Reviewed by Adam.

        Add test where a manifest references an empty file.
        
        * http/tests/appcache/manifest-with-empty-file.html: Added.
        * http/tests/appcache/resources/empty.txt: Added.
        * http/tests/appcache/resources/manifest-with-empty-file.manifest: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@33462 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 787fb793
2008-05-14 Anders Carlsson <andersca@apple.com>
Reviewed by Adam.
Add test where a manifest references an empty file.
* http/tests/appcache/manifest-with-empty-file.html: Added.
* http/tests/appcache/resources/empty.txt: Added.
* http/tests/appcache/resources/manifest-with-empty-file.manifest: Added.
2008-05-14 David Kilzer <ddkilzer@apple.com>
REGRESSION (r26474): WebKit fails jQuery test 64 core module: text(String) subtest 1 Check escaped text (createTextNode)
<html manifest="resources/manifest-with-empty-file.manifest">
<div>This tests that a manifest that contains an empty file will not crash the browser.</div>
<div id="result">FAILURE</div>
<script>
if (window.layoutTestController) {
layoutTestController.dumpAsText();
layoutTestController.waitUntilDone();
}
function cached()
{
document.getElementById('result').innerHTML = 'SUCCESS';
if (window.layoutTestController)
layoutTestController.notifyDone();
}
applicationCache.addEventListener('cached', cached, false);
</script>
</html>
2008-05-14 Anders Carlsson <andersca@apple.com>
Reviewed by Adam.
Don't try to store the resource data if it's empty.
* loader/appcache/ApplicationCacheStorage.cpp:
(WebCore::ApplicationCacheStorage::store):
2008-05-14 Adam Roben <aroben@apple.com>
Windows build fix
......@@ -354,7 +354,8 @@ bool ApplicationCacheStorage::store(ApplicationCacheResource* resource, unsigned
if (dataStatement.prepare() != SQLResultOk)
return false;
dataStatement.bindBlob(1, resource->data()->data(), resource->data()->size());
if (resource->data()->size())
dataStatement.bindBlob(1, resource->data()->data(), resource->data()->size());
if (!dataStatement.executeCommand())
return false;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment