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

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

Issue 2307543002: ServiceWorker: Mojofication of EWInstance::StopWorker (Closed)
Patch Set: Added a check of the status when detached Created 4 years, 2 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.h
diff --git a/content/browser/service_worker/embedded_worker_registry.h b/content/browser/service_worker/embedded_worker_registry.h
index 70475efb5beff381065cadae9e8afabe747022bd..80ce9b3db641f891e996e22d5103754776f3c3d9 100644
--- a/content/browser/service_worker/embedded_worker_registry.h
+++ b/content/browser/service_worker/embedded_worker_registry.h
@@ -109,9 +109,10 @@ class CONTENT_EXPORT EmbeddedWorkerRegistry
private:
friend class base::RefCounted<EmbeddedWorkerRegistry>;
+ friend class MojoEmbeddedWorkerInstanceTest;
friend class EmbeddedWorkerInstance;
friend class EmbeddedWorkerInstanceTest;
- FRIEND_TEST_ALL_PREFIXES(EmbeddedWorkerInstanceTest,
+ FRIEND_TEST_ALL_PREFIXES(EmbeddedWorkerInstanceTestP,
RemoveWorkerInSharedProcess);
using WorkerInstanceMap = std::map<int, EmbeddedWorkerInstance*>;
@@ -135,6 +136,10 @@ class CONTENT_EXPORT EmbeddedWorkerRegistry
// |process_id| could be invalid (i.e. ChildProcessHost::kInvalidUniqueID)
// if it's not running.
void RemoveWorker(int process_id, int embedded_worker_id);
+ // DetachWorker is called when EmbeddedWorkerInstance releases a process.
+ // |process_id| could be invalid (i.e. ChildProcessHost::kInvalidUniqueID)
+ // if it's not running.
+ void DetachWorker(int process_id, int embedded_worker_id);
EmbeddedWorkerInstance* GetWorkerForMessage(int process_id,
int embedded_worker_id);

Powered by Google App Engine
This is Rietveld 408576698