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

Unified Diff: content/child/service_worker/service_worker_registration_handle_reference.cc

Issue 2118243002: [proof-of-concept] SW thread independent of the main thread Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 4 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/child/service_worker/service_worker_registration_handle_reference.cc
diff --git a/content/child/service_worker/service_worker_registration_handle_reference.cc b/content/child/service_worker/service_worker_registration_handle_reference.cc
index 9d118231d937d9c8776fa1ed53a1297af4b5ef62..a276d844e428a894f1e74bbd28565d1cb1a97b7b 100644
--- a/content/child/service_worker/service_worker_registration_handle_reference.cc
+++ b/content/child/service_worker/service_worker_registration_handle_reference.cc
@@ -37,12 +37,16 @@ ServiceWorkerRegistrationHandleReference(
DCHECK(sender_.get());
if (!increment_ref_in_ctor)
return;
+ if (!sender_)
+ return;
sender_->Send(
new ServiceWorkerHostMsg_IncrementRegistrationRefCount(info_.handle_id));
}
ServiceWorkerRegistrationHandleReference::
~ServiceWorkerRegistrationHandleReference() {
+ if (!sender_)
+ return;
sender_->Send(
new ServiceWorkerHostMsg_DecrementRegistrationRefCount(info_.handle_id));
}

Powered by Google App Engine
This is Rietveld 408576698