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

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

Issue 2689693003: Add a helper method to create SW SimpleEventCallbacks. (Closed)
Patch Set: Add a helper method to create SW SimpleEventCallbacks. Created 3 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
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 f23aece6697dd199ee86bd81e291c93396551376..0c4a3d3e1b40db452625e6b23eff89e59dd6a7eb 100644
--- a/content/browser/service_worker/service_worker_dispatcher_host.cc
+++ b/content/browser/service_worker/service_worker_dispatcher_host.cc
@@ -1240,12 +1240,8 @@ void ServiceWorkerDispatcherHost::
event->source.service_worker_info.url = GURL();
}
- // |event_dispatcher| is owned by |worker|, once |worker| got destroyed, the
- // bound function will never be called, so it is safe to use
- // base::Unretained() here.
worker->event_dispatcher()->DispatchExtendableMessageEvent(
- std::move(event), base::Bind(&ServiceWorkerVersion::OnSimpleEventFinished,
- base::Unretained(worker.get()), request_id));
+ std::move(event), worker->CreateSimpleEventCallback(request_id));
}
template <typename SourceInfo>
« no previous file with comments | « content/browser/push_messaging/push_messaging_router.cc ('k') | content/browser/service_worker/service_worker_version.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698