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

Unified Diff: webkit/appcache/appcache_host.cc

Issue 6546004: Defend against selectCache() being called multiple times.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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 | webkit/appcache/web_application_cache_host_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/appcache/appcache_host.cc
===================================================================
--- webkit/appcache/appcache_host.cc (revision 75330)
+++ webkit/appcache/appcache_host.cc (working copy)
@@ -65,31 +65,13 @@
const GURL& manifest_url) {
DCHECK(!pending_start_update_callback_ &&
!pending_swap_cache_callback_ &&
- !pending_get_status_callback_);
+ !pending_get_status_callback_ &&
+ !is_selection_pending());
if (main_resource_blocked_)
frontend_->OnContentBlocked(host_id_,
blocked_manifest_url_);
- // First we handle an unusual case of SelectCache being called a second
- // time. Generally this shouldn't happen, but with bad content I think
- // this can occur... <html manifest=foo> <html manifest=bar></html></html>
- // We handle this by killing whatever loading we have initiated, and by
- // unassociating any hosts we currently have associated... and starting
- // anew with the inputs to this SelectCache call.
- // TODO(michaeln): at some point determine what behavior the algorithms
- // described in the HTML5 draft produce and have our impl produce those
- // results (or suggest changes to the algorihtms described in the spec
- // if the resulting behavior is just too insane).
- if (is_selection_pending()) {
- service_->storage()->CancelDelegateCallbacks(this);
- pending_selected_manifest_url_ = GURL();
- pending_selected_cache_id_ = kNoCacheId;
- } else if (associated_cache()) {
- AssociateCache(NULL);
- }
- new_master_entry_url_ = GURL();
-
// 6.9.6 The application cache selection algorithm.
// The algorithm is started here and continues in FinishCacheSelection,
// after cache or group loading is complete.
« no previous file with comments | « no previous file | webkit/appcache/web_application_cache_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698