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

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

Issue 282263008: Retry: Stop ServiceWorker context when no controllee is associated (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: leak fix Created 6 years, 7 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/embedded_worker_registry.cc
diff --git a/content/browser/service_worker/embedded_worker_registry.cc b/content/browser/service_worker/embedded_worker_registry.cc
index a859268c396b222b3eec789382d84b4ba1c48f5f..688967263fa18c59c7daccccfbbcf3edf646aca3 100644
--- a/content/browser/service_worker/embedded_worker_registry.cc
+++ b/content/browser/service_worker/embedded_worker_registry.cc
@@ -249,13 +249,14 @@ void EmbeddedWorkerRegistry::StartWorkerWithProcessId(
}
ServiceWorkerStatusCode EmbeddedWorkerRegistry::Send(
- int process_id, IPC::Message* message) {
+ int process_id, IPC::Message* message_ptr) {
+ scoped_ptr<IPC::Message> message(message_ptr);
if (!context_)
return SERVICE_WORKER_ERROR_ABORT;
ProcessToSenderMap::iterator found = process_sender_map_.find(process_id);
if (found == process_sender_map_.end())
return SERVICE_WORKER_ERROR_PROCESS_NOT_FOUND;
- if (!found->second->Send(message))
+ if (!found->second->Send(message.release()))
return SERVICE_WORKER_ERROR_IPC_FAILED;
return SERVICE_WORKER_OK;
}

Powered by Google App Engine
This is Rietveld 408576698