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

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

Issue 2688093002: HeapCompact does not need to look up other threads' states (Closed)
Patch Set: Created 3 years, 10 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: third_party/WebKit/Source/platform/heap/HeapCompact.cpp
diff --git a/third_party/WebKit/Source/platform/heap/HeapCompact.cpp b/third_party/WebKit/Source/platform/heap/HeapCompact.cpp
index cd95f8c6792aec83fecb30fdee89a791830a6522..995a7d81ee7da83caecf3a89a4a87cc1c74d825c 100644
--- a/third_party/WebKit/Source/platform/heap/HeapCompact.cpp
+++ b/third_party/WebKit/Source/platform/heap/HeapCompact.cpp
@@ -303,18 +303,12 @@ bool HeapCompact::shouldCompact(ThreadState* state,
reason != BlinkGC::ForcedGC)
return false;
- const ThreadHeap& heap = state->heap();
- // If any of the participating threads require a stack scan,
- // do not compact.
- //
+ // If the GCing thread requires a stack scan, do not compact.
// Why? Should the stack contain an iterator pointing into its
// associated backing store, its references wouldn't be
// correctly relocated.
- for (ThreadState* state : heap.threads()) {
- if (state->stackState() == BlinkGC::HeapPointersOnStack) {
- return false;
- }
- }
+ if (state->stackState() == BlinkGC::HeapPointersOnStack)
+ return false;
// Compaction enable rules:
// - It's been a while since the last time.
« 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