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

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

Issue 367633002: [oilpan]: Don't enter safepoint in SafePointAwareMutexLocker if sweeping. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/heap/ThreadState.h
diff --git a/Source/platform/heap/ThreadState.h b/Source/platform/heap/ThreadState.h
index ee55938a23a43ebaaa05e2493daf6b03f8d1c6a5..5269820c6417a1cff55af4d7d8237da95eed2fb1 100644
--- a/Source/platform/heap/ThreadState.h
+++ b/Source/platform/heap/ThreadState.h
@@ -617,7 +617,11 @@ public:
ThreadState* state = ThreadState::current();
do {
bool leaveSafePoint = false;
- if (!state->isAtSafePoint()) {
+ // We cannot enter a safepoint if we are currently sweeping. In that
+ // case we just try to acquire the lock without being at a safepoint.
+ // If another thread tries to do a GC at that time it might time out
+ // due to this thread not being at a safepoint and waiting on the lock.
haraken 2014/07/01 10:35:10 Would you elaborate on why this doesn't cause dead
+ if (!state->isSweepInProgress() && !state->isAtSafePoint()) {
state->enterSafePoint(ThreadState::HeapPointersOnStack, this);
leaveSafePoint = true;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698