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

Unified Diff: third_party/WebKit/Source/platform/heap/SafePoint.cpp

Issue 1919773002: Revert of Prepare for multiple ThreadHeaps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 years, 8 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/heap/SafePoint.cpp
diff --git a/third_party/WebKit/Source/platform/heap/SafePoint.cpp b/third_party/WebKit/Source/platform/heap/SafePoint.cpp
index 7123964e973647344fd76292b8704705ecd5c7ee..692cc7f00f3434eecfd46f4aa8ab9fcde19f3b12 100644
--- a/third_party/WebKit/Source/platform/heap/SafePoint.cpp
+++ b/third_party/WebKit/Source/platform/heap/SafePoint.cpp
@@ -4,7 +4,6 @@
#include "platform/heap/SafePoint.h"
-#include "platform/heap/Heap.h"
#include "wtf/Atomics.h"
#include "wtf/CurrentTime.h"
@@ -35,8 +34,8 @@ bool SafePointBarrier::parkOthers()
ThreadState* current = ThreadState::current();
// Lock threadAttachMutex() to prevent threads from attaching.
- current->lockThreadAttachMutex();
- const ThreadStateSet& threads = current->heap().threads();
+ ThreadState::lockThreadAttachMutex();
+ ThreadState::AttachedThreadStateSet& threads = ThreadState::attachedThreads();
MutexLocker locker(m_mutex);
atomicAdd(&m_unparkedThreadCount, threads.size());
@@ -65,8 +64,7 @@ bool SafePointBarrier::parkOthers()
void SafePointBarrier::resumeOthers(bool barrierLocked)
{
- ThreadState* current = ThreadState::current();
- const ThreadStateSet& threads = current->heap().threads();
+ ThreadState::AttachedThreadStateSet& threads = ThreadState::attachedThreads();
atomicSubtract(&m_unparkedThreadCount, threads.size());
releaseStore(&m_canResume, 1);
@@ -79,7 +77,7 @@ void SafePointBarrier::resumeOthers(bool barrierLocked)
m_resume.broadcast();
}
- current->unlockThreadAttachMutex();
+ ThreadState::unlockThreadAttachMutex();
ASSERT(ThreadState::current()->isAtSafePoint());
}
« no previous file with comments | « third_party/WebKit/Source/platform/heap/PagePool.cpp ('k') | third_party/WebKit/Source/platform/heap/ThreadState.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698