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

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

Issue 2627953005: Make workers inherit the large heap limit of the main isolate. (Closed)
Patch Set: fix tests Created 3 years, 11 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/WorkerThread.cpp
diff --git a/third_party/WebKit/Source/core/workers/WorkerThread.cpp b/third_party/WebKit/Source/core/workers/WorkerThread.cpp
index 4f310559fe2a3bab11a2f8902b6e85cc2a0dc404..eb572eff34db569afc2c8edf7ebc06ccab518874 100644
--- a/third_party/WebKit/Source/core/workers/WorkerThread.cpp
+++ b/third_party/WebKit/Source/core/workers/WorkerThread.cpp
@@ -452,7 +452,11 @@ void WorkerThread::initializeOnWorkerThread(
WorkerThreadStartMode startMode = startupData->m_startMode;
std::unique_ptr<Vector<char>> cachedMetaData =
std::move(startupData->m_cachedMetaData);
- V8CacheOptions v8CacheOptions = startupData->m_v8CacheOptions;
+ V8CacheOptions v8CacheOptions =
+ startupData->m_workerV8Settings.m_v8CacheOptions;
+ bool heapLimitIncreasedForDebugging =
+ startupData->m_workerV8Settings.m_heapLimitMode ==
+ WorkerV8Settings::HeapLimitMode::IncreasedForDebugging;
{
MutexLocker lock(m_threadStateMutex);
@@ -464,6 +468,10 @@ void WorkerThread::initializeOnWorkerThread(
// Optimize for memory usage instead of latency for the worker isolate.
isolate()->IsolateInBackgroundNotification();
+ if (heapLimitIncreasedForDebugging) {
+ isolate()->IncreaseHeapLimitForDebugging();
+ }
+
m_consoleMessageStorage = new ConsoleMessageStorage();
m_globalScope = createWorkerGlobalScope(std::move(startupData));
m_workerReportingProxy.didCreateWorkerGlobalScope(globalScope());

Powered by Google App Engine
This is Rietveld 408576698