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

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

Issue 901243002: Fix and IPC fuzzer top crasher in OnWorkerScriptLoaded. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/service_worker/service_worker_dispatcher_host.cc
diff --git a/content/browser/service_worker/service_worker_dispatcher_host.cc b/content/browser/service_worker/service_worker_dispatcher_host.cc
index a210b51d89a7f319f3a21285903b2541bd72edda..89d45807fd71b712f24ccd795934aaa75970dbb7 100644
--- a/content/browser/service_worker/service_worker_dispatcher_host.cc
+++ b/content/browser/service_worker/service_worker_dispatcher_host.cc
@@ -690,7 +690,11 @@ void ServiceWorkerDispatcherHost::OnWorkerScriptLoaded(
ServiceWorkerProviderHost* provider_host =
GetContext()->GetProviderHost(render_process_id_, provider_id);
- DCHECK(provider_host);
+ if (!provider_host) {
+ BadMessageReceived();
+ return;
+ }
+
provider_host->SetReadyToSendMessagesToWorker(thread_id);
EmbeddedWorkerRegistry* registry = GetContext()->embedded_worker_registry();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698