Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(126)

Unified Diff: webkit/appcache/appcache_update_job.cc

Issue 596078: AppCache: Fix a bug with failing to deliver the ERROR event in some cases.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/appcache/appcache_update_job.cc
===================================================================
--- webkit/appcache/appcache_update_job.cc (revision 38800)
+++ webkit/appcache/appcache_update_job.cc (working copy)
@@ -14,7 +14,7 @@
namespace appcache {
-static const int kBufferSize = 4096;
+static const int kBufferSize = 32768;
static const size_t kMaxConcurrentUrlFetches = 2;
static const int kMax503Retries = 3;
@@ -734,10 +734,16 @@
AppCache* newest_cache,
bool success) {
DCHECK(stored_state_ == STORING);
- if (success)
+ if (success) {
stored_state_ = STORED;
- else
+ } else {
internal_state_ = CACHE_FAILURE;
+
+ // Restore inprogress_cache_ to get the proper events delivered
+ // and the proper cleanup to occur.
+ if (newest_cache != group->newest_complete_cache())
+ inprogress_cache_ = newest_cache;
+ }
MaybeCompleteUpdate(); // will definitely complete
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698