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

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

Issue 106353005: Expose performance.memory in workers (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@Perf-Memory-SharedWorker
Patch Set: Created 6 years, 10 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: Source/core/workers/WorkerGlobalScope.cpp
diff --git a/Source/core/workers/WorkerGlobalScope.cpp b/Source/core/workers/WorkerGlobalScope.cpp
index e7e302d8187271df8ca5752750af342b6bd42587..d6090c5cf690ed3e89259eecdf46377c6e07bd47 100644
--- a/Source/core/workers/WorkerGlobalScope.cpp
+++ b/Source/core/workers/WorkerGlobalScope.cpp
@@ -73,7 +73,7 @@ public:
virtual bool isCleanupTask() const { return true; }
};
-WorkerGlobalScope::WorkerGlobalScope(const KURL& url, const String& userAgent, WorkerThread* thread, double timeOrigin, PassOwnPtr<WorkerClients> workerClients)
+WorkerGlobalScope::WorkerGlobalScope(const KURL& url, const String& userAgent, WorkerThread* thread, double timeOrigin, const WorkerSettings& settings, PassOwnPtr<WorkerClients> workerClients)
: m_url(url)
, m_userAgent(userAgent)
, m_script(adoptPtr(new WorkerScriptController(*this)))
@@ -83,10 +83,12 @@ WorkerGlobalScope::WorkerGlobalScope(const KURL& url, const String& userAgent, W
, m_eventQueue(WorkerEventQueue::create(this))
, m_workerClients(workerClients)
, m_timeOrigin(timeOrigin)
+ , m_workerSettings(WorkerSettings::create())
{
ScriptWrappable::init(this);
setClient(this);
setSecurityOrigin(SecurityOrigin::create(url));
+ m_workerSettings->setMemoryInfoEnabled(settings.memoryInfoEnabled());
m_workerClients->reattachThread();
}

Powered by Google App Engine
This is Rietveld 408576698