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

Unified Diff: content/browser/service_worker/service_worker_context_request_handler.cc

Issue 369063004: ServiceWorker: SWRegisterJob should manage status of SWVersion (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix ServiceWorkerVersionBrowserTest Created 6 years, 5 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
Index: content/browser/service_worker/service_worker_context_request_handler.cc
diff --git a/content/browser/service_worker/service_worker_context_request_handler.cc b/content/browser/service_worker/service_worker_context_request_handler.cc
index cb4b1e38270ac3f8500858fd16c4758d9ea1f7d6..b1a017a81b880fd1f18961f0ae7a1ab5e889ebda 100644
--- a/content/browser/service_worker/service_worker_context_request_handler.cc
+++ b/content/browser/service_worker/service_worker_context_request_handler.cc
@@ -75,8 +75,10 @@ net::URLRequestJob* ServiceWorkerContextRequestHandler::MaybeCreateJob(
bool ServiceWorkerContextRequestHandler::ShouldAddToScriptCache(
const GURL& url) {
// We only write imports that occur during the initial eval.
- if (version_->status() != ServiceWorkerVersion::NEW)
+ if (version_->status() != ServiceWorkerVersion::NEW &&
+ version_->status() != ServiceWorkerVersion::INSTALLING) {
falken 2014/07/07 07:05:16 I'm curious whether this can be more restrictive?
nhiroki 2014/07/07 08:26:41 I think the both are necessary. Normally the versi
return false;
+ }
return version_->script_cache_map()->Lookup(url) ==
kInvalidServiceWorkerResponseId;
}

Powered by Google App Engine
This is Rietveld 408576698