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

Unified Diff: third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.cpp

Issue 2026993004: Delay leak reporting until worker in-process proxies have been finalized. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: drop back to ps#2 approach Created 4 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: third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.cpp
diff --git a/third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.cpp b/third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.cpp
index fb466aa6afbb68412a65b1d12a9020c3b6dad7f6..29f1480cd9d153c1d275c2580d9d33a0d10f6d62 100644
--- a/third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.cpp
+++ b/third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.cpp
@@ -66,6 +66,8 @@ void processMessageOnWorkerGlobalScope(PassRefPtr<SerializedScriptValue> message
workerObjectProxy->confirmMessageFromWorkerObject(V8GCController::hasPendingActivity(globalScope->thread()->isolate(), scriptContext));
}
+static int s_liveMessagingProxyCount = 0;
+
} // namespace
InProcessWorkerMessagingProxy::InProcessWorkerMessagingProxy(InProcessWorkerBase* workerObject, WorkerClients* workerClients)
@@ -81,6 +83,7 @@ InProcessWorkerMessagingProxy::InProcessWorkerMessagingProxy(InProcessWorkerBase
{
DCHECK(isParentContextThread());
DCHECK(m_workerObject);
+ s_liveMessagingProxyCount++;
}
InProcessWorkerMessagingProxy::~InProcessWorkerMessagingProxy()
@@ -89,6 +92,13 @@ InProcessWorkerMessagingProxy::~InProcessWorkerMessagingProxy()
DCHECK(!m_workerObject);
if (m_loaderProxy)
m_loaderProxy->detachProvider(this);
+ s_liveMessagingProxyCount--;
+}
+
+int InProcessWorkerMessagingProxy::proxyCount()
+{
+ DCHECK(isMainThread());
+ return s_liveMessagingProxyCount;
}
void InProcessWorkerMessagingProxy::startWorkerGlobalScope(const KURL& scriptURL, const String& userAgent, const String& sourceCode)

Powered by Google App Engine
This is Rietveld 408576698