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

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

Issue 1454963003: ServiceWorker: Ensure that ServiceWorkerDispatcher always adopts passed handle references (1) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 5 years, 1 month 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 | « content/child/service_worker/service_worker_provider_context.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/service_worker/service_worker_provider_context.cc
diff --git a/content/child/service_worker/service_worker_provider_context.cc b/content/child/service_worker/service_worker_provider_context.cc
index bc146210105dd5219101b336e79358e1e4f86d0c..44e567a65f8b12a8bcd72e4a6122114711747b04 100644
--- a/content/child/service_worker/service_worker_provider_context.cc
+++ b/content/child/service_worker/service_worker_provider_context.cc
@@ -163,18 +163,13 @@ ServiceWorkerProviderContext::~ServiceWorkerProviderContext() {
}
void ServiceWorkerProviderContext::OnAssociateRegistration(
- const ServiceWorkerRegistrationObjectInfo& info,
- const ServiceWorkerVersionAttributes& attrs) {
+ scoped_ptr<ServiceWorkerRegistrationHandleReference> registration,
+ scoped_ptr<ServiceWorkerHandleReference> installing,
+ scoped_ptr<ServiceWorkerHandleReference> waiting,
+ scoped_ptr<ServiceWorkerHandleReference> active) {
DCHECK(main_thread_task_runner_->RunsTasksOnCurrentThread());
- delegate_->AssociateRegistration(
- ServiceWorkerRegistrationHandleReference::Adopt(
- info, thread_safe_sender_.get()),
- ServiceWorkerHandleReference::Adopt(attrs.installing,
- thread_safe_sender_.get()),
- ServiceWorkerHandleReference::Adopt(attrs.waiting,
- thread_safe_sender_.get()),
- ServiceWorkerHandleReference::Adopt(attrs.active,
- thread_safe_sender_.get()));
+ delegate_->AssociateRegistration(registration.Pass(), installing.Pass(),
+ waiting.Pass(), active.Pass());
}
void ServiceWorkerProviderContext::OnDisassociateRegistration() {
« no previous file with comments | « content/child/service_worker/service_worker_provider_context.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698