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

Unified Diff: third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.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/InProcessWorkerMessagingProxy.cpp
diff --git a/third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.cpp b/third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.cpp
index 6026c0979c57bfb4c3b9d8b5bfa5b925539ab79b..576c9f6e5393120a360d3d56f32d015a4abd2b91 100644
--- a/third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.cpp
+++ b/third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.cpp
@@ -123,13 +123,18 @@ void InProcessWorkerMessagingProxy::startWorkerGlobalScope(
workerInspectorProxy()->workerStartMode(document);
std::unique_ptr<WorkerSettings> workerSettings =
WTF::wrapUnique(new WorkerSettings(document->settings()));
+ WorkerV8Settings workerV8Settings(WorkerV8Settings::Default());
+ workerV8Settings.m_heapLimitMode =
+ toIsolate(document)->IsHeapLimitIncreasedForDebugging()
+ ? WorkerV8Settings::HeapLimitMode::IncreasedForDebugging
+ : WorkerV8Settings::HeapLimitMode::Default;
std::unique_ptr<WorkerThreadStartupData> startupData =
WorkerThreadStartupData::create(
scriptURL, userAgent, sourceCode, nullptr, startMode,
csp->headers().get(), referrerPolicy, starterOrigin,
m_workerClients.release(), document->addressSpace(),
OriginTrialContext::getTokens(document).get(),
- std::move(workerSettings));
+ std::move(workerSettings), workerV8Settings);
initializeWorkerThread(std::move(startupData));
workerInspectorProxy()->workerThreadCreated(document, workerThread(),

Powered by Google App Engine
This is Rietveld 408576698