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

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

Issue 1137463006: AppCache: Defend against bad IPC messages. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 | 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 099c54e55adae043a613cfdca79faaa2d1cfeadc..e055f1a1de8465ee7ec45eb386593bb8be1ecd55 100644
--- a/content/browser/appcache/appcache_backend_impl.cc
+++ b/content/browser/appcache/appcache_backend_impl.cc
@@ -68,7 +68,7 @@ bool AppCacheBackendImpl::SelectCache(
const int64 cache_document_was_loaded_from,
const GURL& manifest_url) {
AppCacheHost* host = GetHost(host_id);
- if (!host)
+ if (!host || host->was_select_cache_called())
return false;
host->SelectCache(document_url, cache_document_was_loaded_from,
@@ -79,7 +79,7 @@ bool AppCacheBackendImpl::SelectCache(
bool AppCacheBackendImpl::SelectCacheForWorker(
int host_id, int parent_process_id, int parent_host_id) {
AppCacheHost* host = GetHost(host_id);
- if (!host)
+ if (!host || host->was_select_cache_called())
return false;
host->SelectCacheForWorker(parent_process_id, parent_host_id);
@@ -89,7 +89,7 @@ bool AppCacheBackendImpl::SelectCacheForWorker(
bool AppCacheBackendImpl::SelectCacheForSharedWorker(
int host_id, int64 appcache_id) {
AppCacheHost* host = GetHost(host_id);
- if (!host)
+ if (!host || host->was_select_cache_called())
return false;
host->SelectCacheForSharedWorker(appcache_id);
« 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