Index: src/heap/remembered-set.h |
diff --git a/src/heap/remembered-set.h b/src/heap/remembered-set.h |
index b60cd451ee7166a97ded9c17682a2364b29d8c53..37439bfa62d023a63a55cc6274b1f8bd90220729 100644 |
--- a/src/heap/remembered-set.h |
+++ b/src/heap/remembered-set.h |
@@ -12,8 +12,6 @@ |
namespace v8 { |
namespace internal { |
- |
-enum RememberedSetIterationMode { SYNCHRONIZED, NON_SYNCHRONIZED }; |
// TODO(ulan): Investigate performance of de-templatizing this class. |
template <RememberedSetType type> |
@@ -100,13 +98,9 @@ |
// Iterates and filters the remembered set with the given callback. |
// The callback should take (Address slot) and return SlotCallbackResult. |
template <typename Callback> |
- static void Iterate(Heap* heap, RememberedSetIterationMode mode, |
- Callback callback) { |
- IterateMemoryChunks(heap, [mode, callback](MemoryChunk* chunk) { |
- if (mode == SYNCHRONIZED) chunk->mutex()->Lock(); |
- Iterate(chunk, callback); |
- if (mode == SYNCHRONIZED) chunk->mutex()->Unlock(); |
- }); |
+ static void Iterate(Heap* heap, Callback callback) { |
+ IterateMemoryChunks( |
+ heap, [callback](MemoryChunk* chunk) { Iterate(chunk, callback); }); |
} |
// Iterates over all memory chunks that contains non-empty slot sets. |
@@ -183,12 +177,9 @@ |
// The callback should take (SlotType slot_type, SlotAddress slot) and return |
// SlotCallbackResult. |
template <typename Callback> |
- static void IterateTyped(Heap* heap, RememberedSetIterationMode mode, |
- Callback callback) { |
- IterateMemoryChunks(heap, [mode, callback](MemoryChunk* chunk) { |
- if (mode == SYNCHRONIZED) chunk->mutex()->Lock(); |
+ static void IterateTyped(Heap* heap, Callback callback) { |
+ IterateMemoryChunks(heap, [callback](MemoryChunk* chunk) { |
IterateTyped(chunk, callback); |
- if (mode == SYNCHRONIZED) chunk->mutex()->Unlock(); |
}); |
} |