Bug 129753

Summary: ASSERT(newestManifest) fails in WebCore::ApplicationCacheGroup::didFinishLoadingManifest()
Product: WebKit Reporter: Daniel Bates <dbates>
Component: WebCore Misc.Assignee: Daniel Bates <dbates>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, ap, beidson, commit-queue, ddkilzer, japhet, jeffrey+webkit, joepeck, t.tom
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: Unspecified   
Attachments:
Description Flags
Patch ap: review+

Daniel Bates
Reported 2014-03-05 12:46:25 PST
For some reasons an app cache for a web site W may only be partially written to disk such that only a cached group entry is written. That is, no cached resources, including the manifest resource, are written to disk. Subsequently visiting W after loading the app cache from disk (say, by closing Safari and launching it again) will cause an assertion failure in WebCore::ApplicationCacheGroup::didFinishLoadingManifest() (ASSERT(newestManifest)) because the manifest resource for the latest completed app cache (newestManifest) is null.
Attachments
Patch (8.82 KB, patch)
2014-03-05 15:11 PST, Daniel Bates
ap: review+
Daniel Bates
Comment 1 2014-03-05 13:04:12 PST
Daniel Bates
Comment 2 2014-03-05 15:11:57 PST
Alexey Proskuryakov
Comment 3 2014-03-05 15:55:02 PST
Comment on attachment 225919 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=225919&action=review > Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp:1186 > + LOG_ERROR("No manifest resource was in the cache"); I'd say: "Could not load application cache, because there was no manifest resource". > Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp:1476 > + if (!deleteCacheGroupRecord(manifestURL)) { > LOG_ERROR("Could not load cache group id, error \"%s\"", m_database.lastErrorMsg()); This log message doesn't look right now.
Daniel Bates
Comment 4 2014-03-05 16:53:11 PST
(In reply to comment #3) > (From update of attachment 225919 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=225919&action=review > > > Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp:1186 > > + LOG_ERROR("No manifest resource was in the cache"); > > I'd say: "Could not load application cache, because there was no manifest resource". Will change error message string to read: "Could not load application cache because there was no manifest resource" > > > Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp:1476 > > + if (!deleteCacheGroupRecord(manifestURL)) { > > LOG_ERROR("Could not load cache group id, error \"%s\"", m_database.lastErrorMsg()); > > This log message doesn't look right now. Will change error message string to read: "Could not delete cache group record, error \"%s\""
Daniel Bates
Comment 5 2014-03-05 16:57:08 PST
Daniel Bates
Comment 6 2014-03-12 10:02:53 PDT
*** Bug 129608 has been marked as a duplicate of this bug. ***
Note You need to log in before you can comment on or make changes to this bug.