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

Unified Diff: Source/platform/heap/SafePoint.h

Issue 1145423009: Oilpan: simplify away StoppingOtherThreads pseudo GCState. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: improve comment (only) Created 5 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: Source/platform/heap/SafePoint.h
diff --git a/Source/platform/heap/SafePoint.h b/Source/platform/heap/SafePoint.h
index 76713c4c9cf6fcf91b7bcb568bfadc520a6580ea..29d248a99d65534a27f80f70259a098e646e8be6 100644
--- a/Source/platform/heap/SafePoint.h
+++ b/Source/platform/heap/SafePoint.h
@@ -13,8 +13,8 @@ namespace blink {
class SafePointScope final {
WTF_MAKE_NONCOPYABLE(SafePointScope);
public:
- explicit SafePointScope(ThreadState::StackState stackState)
- : m_state(ThreadState::current())
+ SafePointScope(ThreadState::StackState stackState, ThreadState* state = ThreadState::current())
+ : m_state(state)
{
RELEASE_ASSERT(!m_state->isAtSafePoint());
m_state->enterSafePoint(stackState, this);
@@ -22,8 +22,7 @@ public:
~SafePointScope()
{
- if (m_state)
- m_state->leaveSafePoint();
+ m_state->leaveSafePoint();
}
private:

Powered by Google App Engine
This is Rietveld 408576698