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

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: revert 'explicit' removal 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
« no previous file with comments | « Source/platform/heap/Heap.cpp ('k') | Source/platform/heap/ThreadState.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/heap/SafePoint.h
diff --git a/Source/platform/heap/SafePoint.h b/Source/platform/heap/SafePoint.h
index 76713c4c9cf6fcf91b7bcb568bfadc520a6580ea..982cbe35e47db41e9bb7d1bd7621b8a4015ad88b 100644
--- a/Source/platform/heap/SafePoint.h
+++ b/Source/platform/heap/SafePoint.h
@@ -13,11 +13,13 @@ namespace blink {
class SafePointScope final {
WTF_MAKE_NONCOPYABLE(SafePointScope);
public:
- explicit SafePointScope(ThreadState::StackState stackState)
- : m_state(ThreadState::current())
+ explicit SafePointScope(ThreadState::StackState stackState, ThreadState* state = ThreadState::current())
+ : m_state(state)
{
- RELEASE_ASSERT(!m_state->isAtSafePoint());
- m_state->enterSafePoint(stackState, this);
+ if (m_state) {
+ RELEASE_ASSERT(!m_state->isAtSafePoint());
+ m_state->enterSafePoint(stackState, this);
+ }
}
~SafePointScope()
« no previous file with comments | « Source/platform/heap/Heap.cpp ('k') | Source/platform/heap/ThreadState.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698