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

Unified Diff: content/browser/appcache/appcache_backend_impl.cc

Issue 1418783005: Fix possible map::end() dereference in AppCacheUpdateJob triggered by a compromised renderer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move check to host, add unittest Created 5 years, 1 month 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 | content/browser/appcache/appcache_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/appcache/appcache_backend_impl.cc
diff --git a/content/browser/appcache/appcache_backend_impl.cc b/content/browser/appcache/appcache_backend_impl.cc
index e055f1a1de8465ee7ec45eb386593bb8be1ecd55..01eed000ef0a21f77d6b4d692f66d918565d3f0a 100644
--- a/content/browser/appcache/appcache_backend_impl.cc
+++ b/content/browser/appcache/appcache_backend_impl.cc
@@ -68,32 +68,29 @@ bool AppCacheBackendImpl::SelectCache(
const int64 cache_document_was_loaded_from,
const GURL& manifest_url) {
AppCacheHost* host = GetHost(host_id);
- if (!host || host->was_select_cache_called())
+ if (!host)
return false;
- host->SelectCache(document_url, cache_document_was_loaded_from,
+ return host->SelectCache(document_url, cache_document_was_loaded_from,
manifest_url);
- return true;
}
bool AppCacheBackendImpl::SelectCacheForWorker(
int host_id, int parent_process_id, int parent_host_id) {
AppCacheHost* host = GetHost(host_id);
- if (!host || host->was_select_cache_called())
+ if (!host)
return false;
- host->SelectCacheForWorker(parent_process_id, parent_host_id);
- return true;
+ return host->SelectCacheForWorker(parent_process_id, parent_host_id);
}
bool AppCacheBackendImpl::SelectCacheForSharedWorker(
int host_id, int64 appcache_id) {
AppCacheHost* host = GetHost(host_id);
- if (!host || host->was_select_cache_called())
+ if (!host)
return false;
- host->SelectCacheForSharedWorker(appcache_id);
- return true;
+ return host->SelectCacheForSharedWorker(appcache_id);
}
bool AppCacheBackendImpl::MarkAsForeignEntry(
@@ -104,8 +101,7 @@ bool AppCacheBackendImpl::MarkAsForeignEntry(
if (!host)
return false;
- host->MarkAsForeignEntry(document_url, cache_document_was_loaded_from);
- return true;
+ return host->MarkAsForeignEntry(document_url, cache_document_was_loaded_from);
}
bool AppCacheBackendImpl::GetStatusWithCallback(
« no previous file with comments | « no previous file | content/browser/appcache/appcache_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698