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

Unified Diff: Source/web/WebSharedWorkerImpl.cpp

Issue 106353005: Expose performance.memory in workers (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@Perf-Memory-SharedWorker
Patch Set: Introduce WorkerSettings 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/web/WebSharedWorkerImpl.cpp
diff --git a/Source/web/WebSharedWorkerImpl.cpp b/Source/web/WebSharedWorkerImpl.cpp
index affe4fa163d2c6f647c8867d567eaaf69f386f7f..09a2f7cdb597059b79624afd06cdaf3076e8425e 100644
--- a/Source/web/WebSharedWorkerImpl.cpp
+++ b/Source/web/WebSharedWorkerImpl.cpp
@@ -156,6 +156,7 @@ WebSharedWorkerImpl::WebSharedWorkerImpl(WebSharedWorkerClient* client)
, m_clientWeakPtr(WeakPtr<WebSharedWorkerClient>(m_client))
, m_pauseWorkerContextOnStart(false)
, m_attachDevToolsOnStart(false)
+ , m_settings(adoptPtr(new WebWorkerSettingsImpl()))
{
initializeWebKitStaticValues();
}
@@ -350,7 +351,10 @@ void WebSharedWorkerImpl::onScriptLoaderFinished()
provideDatabaseClientToWorker(workerClients.get(), DatabaseClientImpl::create());
WebSecurityOrigin webSecurityOrigin(m_loadingDocument->securityOrigin());
providePermissionClientToWorker(workerClients.get(), adoptPtr(client()->createWorkerPermissionClientProxy(webSecurityOrigin)));
- OwnPtr<WorkerThreadStartupData> startupData = WorkerThreadStartupData::create(m_url, m_loadingDocument->userAgent(m_url), m_mainScriptLoader->script(), startMode, m_contentSecurityPolicy, static_cast<WebCore::ContentSecurityPolicy::HeaderType>(m_policyType), workerClients.release());
+ OwnPtr<WorkerSettings> settings = WorkerSettings::create();
+ settings->setMemoryInfoEnabled(m_settings->memoryInfoEnabled());
kinuko 2014/03/04 04:34:35 As I commented in the other file I prefer having t
Pan 2014/03/06 08:50:56 thanks! done
+ OwnPtr<WorkerThreadStartupData> startupData = WorkerThreadStartupData::create(m_url, m_loadingDocument->userAgent(m_url), m_mainScriptLoader->script(), startMode, m_contentSecurityPolicy, static_cast<WebCore::ContentSecurityPolicy::HeaderType>(m_policyType), workerClients.release(), settings.release());
+
setWorkerThread(SharedWorkerThread::create(m_name, *this, *this, startupData.release()));
InspectorInstrumentation::scriptImported(m_loadingDocument.get(), m_mainScriptLoader->identifier(), m_mainScriptLoader->script());
m_mainScriptLoader.clear();

Powered by Google App Engine
This is Rietveld 408576698