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

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

Issue 325173002: ServiceWorker: Confirm the liveness of the associated context before handling message (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix more Created 6 years, 6 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_provider_host.h
diff --git a/content/browser/service_worker/service_worker_provider_host.h b/content/browser/service_worker/service_worker_provider_host.h
index d6f1ec8306ebab42e9090dbc9ab9f9b734d61852..31f4a372b1bd7633651c8f160266267bbb26d3dd 100644
--- a/content/browser/service_worker/service_worker_provider_host.h
+++ b/content/browser/service_worker/service_worker_provider_host.h
@@ -94,6 +94,10 @@ class CONTENT_EXPORT ServiceWorkerProviderHost
// versions.
bool ValidateVersionForAssociation(ServiceWorkerVersion* version);
+ // Returns true if the context referred to by this host (i.e. |context_|) is
+ // still alive.
+ bool IsContextAlive();
+
// Dispatches message event to the document.
void PostMessage(const base::string16& message,
const std::vector<int>& sent_message_port_ids);

Powered by Google App Engine
This is Rietveld 408576698