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

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

Issue 2124693002: Worker: Fix broken GC logic on Dedicated Worker while DOMTimer is set (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 4 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.h
diff --git a/third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.h b/third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.h
index 87064e259ea923b6629a62e88e96216533e91440..05583b0b15565b8c2984d6e1ba20b604549bdcae 100644
--- a/third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.h
+++ b/third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.h
@@ -71,9 +71,12 @@ public:
void dispatchErrorEvent(const String& errorMessage, std::unique_ptr<SourceLocation>, int exceptionId);
void reportConsoleMessage(MessageSource, MessageLevel, const String& message, std::unique_ptr<SourceLocation>);
void postMessageToPageInspector(const String&);
- void confirmMessageFromWorkerObject(bool hasPendingActivity);
- void reportPendingActivity(bool hasPendingActivity);
- void workerThreadTerminated();
+
+ // 'virtual' for testing.
+ virtual void confirmMessageFromWorkerObject();
+ virtual void pendingActivityFinished();
+ virtual void workerThreadTerminated();
+
void workerThreadCreated();
ExecutionContext* getExecutionContext() const { return m_executionContext.get(); }
@@ -93,6 +96,9 @@ protected:
InProcessWorkerObjectProxy& workerObjectProxy() { return *m_workerObjectProxy.get(); }
private:
+ friend class InProcessWorkerMessagingProxyForTest;
+ InProcessWorkerMessagingProxy(ExecutionContext*, InProcessWorkerBase*, WorkerClients*);
+
void workerObjectDestroyedInternal();
// WorkerLoaderProxyProvider
@@ -113,10 +119,7 @@ private:
// Unconfirmed messages from the parent context thread to the worker thread.
unsigned m_unconfirmedMessageCount;
- // The latest confirmation from worker thread reported that it was still
- // active.
- bool m_workerThreadHadPendingActivity;
-
+ bool m_workerGlobalScopeMayHavePendingActivity;
bool m_askedToTerminate;
// Tasks are queued here until there's a thread object created.

Powered by Google App Engine
This is Rietveld 408576698