Index: content/browser/service_worker/service_worker_version.cc |
diff --git a/content/browser/service_worker/service_worker_version.cc b/content/browser/service_worker/service_worker_version.cc |
index cf2c4e07580a5b3f983a919ac9acc8566caa1c62..c7fac32149dee12aa482657a72ffebe954546add 100644 |
--- a/content/browser/service_worker/service_worker_version.cc |
+++ b/content/browser/service_worker/service_worker_version.cc |
@@ -914,7 +914,14 @@ void ServiceWorkerVersion::OnDetached(EmbeddedWorkerStatus old_status) { |
} |
void ServiceWorkerVersion::OnScriptLoaded() { |
- DCHECK(GetMainScriptHttpResponseInfo()); |
+ DCHECK(GetMainScriptHttpResponseInfo() || |
+ // TODO(scottmg|falken): This DCHECK is currently triggered in |
+ // --network-service because ServiceWorkerReadFromCacheJob isn't being |
+ // used to retrieve the service worker js. This should be removed once |
+ // that's done. |
+ (IsBrowserSideNavigationEnabled() && |
+ base::CommandLine::ForCurrentProcess()->HasSwitch( |
+ switches::kEnableNetworkService))); |
if (IsInstalled(status())) |
UMA_HISTOGRAM_BOOLEAN("ServiceWorker.ScriptLoadSuccess", true); |
} |