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

Unified Diff: third_party/WebKit/Source/platform/WebThreadSupportingGC.cpp

Issue 1910753002: Add enablePerThreadHeap flag to ThreadState (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 years, 7 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/platform/WebThreadSupportingGC.cpp
diff --git a/third_party/WebKit/Source/platform/WebThreadSupportingGC.cpp b/third_party/WebKit/Source/platform/WebThreadSupportingGC.cpp
index 00f39c38c22966f17080336b9a119740d45842a6..a0d4ad3bf5eeb280bffdb72a93bf93799282a70e 100644
--- a/third_party/WebKit/Source/platform/WebThreadSupportingGC.cpp
+++ b/third_party/WebKit/Source/platform/WebThreadSupportingGC.cpp
@@ -10,18 +10,19 @@
namespace blink {
-PassOwnPtr<WebThreadSupportingGC> WebThreadSupportingGC::create(const char* name)
+PassOwnPtr<WebThreadSupportingGC> WebThreadSupportingGC::create(const char* name, bool perThreadHeapEnabled)
{
- return adoptPtr(new WebThreadSupportingGC(name, nullptr));
+ return adoptPtr(new WebThreadSupportingGC(name, nullptr, perThreadHeapEnabled));
}
-PassOwnPtr<WebThreadSupportingGC> WebThreadSupportingGC::createForThread(WebThread* thread)
+PassOwnPtr<WebThreadSupportingGC> WebThreadSupportingGC::createForThread(WebThread* thread, bool perThreadHeapEnabled)
{
- return adoptPtr(new WebThreadSupportingGC(nullptr, thread));
+ return adoptPtr(new WebThreadSupportingGC(nullptr, thread, perThreadHeapEnabled));
}
-WebThreadSupportingGC::WebThreadSupportingGC(const char* name, WebThread* thread)
+WebThreadSupportingGC::WebThreadSupportingGC(const char* name, WebThread* thread, bool perThreadHeapEnabled)
: m_thread(thread)
+ , m_perThreadHeapEnabled(perThreadHeapEnabled)
{
#if ENABLE(ASSERT)
ASSERT(!name || !thread);
@@ -47,7 +48,7 @@ WebThreadSupportingGC::~WebThreadSupportingGC()
void WebThreadSupportingGC::initialize()
{
- ThreadState::attachCurrentThread();
+ ThreadState::attachCurrentThread(m_perThreadHeapEnabled);
m_gcTaskRunner = adoptPtr(new GCTaskRunner(m_thread));
}
« no previous file with comments | « third_party/WebKit/Source/platform/WebThreadSupportingGC.h ('k') | third_party/WebKit/Source/platform/heap/HeapTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698