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

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

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/WorkerGlobalScope.cpp
diff --git a/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp b/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp
index 4d5192dabb97c756d37fedda027bdfc2185acf18..ece0725351f377c948d311295949c44635fcac15 100644
--- a/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp
+++ b/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp
@@ -235,6 +235,11 @@ v8::Local<v8::Object> WorkerGlobalScope::associateWithWrapper(v8::Isolate*, cons
return v8::Local<v8::Object>();
}
+bool WorkerGlobalScope::hasPendingActivity() const
+{
+ return m_timers.hasInstalledTimeout();
+}
+
bool WorkerGlobalScope::isJSExecutionForbidden() const
{
return m_scriptController->isExecutionForbidden();
@@ -287,7 +292,8 @@ ExecutionContext* WorkerGlobalScope::getExecutionContext() const
}
WorkerGlobalScope::WorkerGlobalScope(const KURL& url, const String& userAgent, WorkerThread* thread, double timeOrigin, std::unique_ptr<SecurityOrigin::PrivilegeData> starterOriginPrivilageData, WorkerClients* workerClients)
- : m_url(url)
+ : ActiveScriptWrappable(this)
+ , m_url(url)
, m_userAgent(userAgent)
, m_v8CacheOptions(V8CacheOptionsDefault)
, m_scriptController(WorkerOrWorkletScriptController::create(this, thread->isolate()))

Powered by Google App Engine
This is Rietveld 408576698