Index: src/serialize.cc |
diff --git a/src/serialize.cc b/src/serialize.cc |
index 7e7c42cd8731149e3f3f17aaaeed050061d38d08..a232d8c9b5b4d8574e50c4c439a0a94b3c000078 100644 |
--- a/src/serialize.cc |
+++ b/src/serialize.cc |
@@ -1326,6 +1326,14 @@ void PartialSerializer::Serialize(Object** object) { |
} |
+bool Serializer::ShouldBeSkipped(Object** current) { |
+ Object** roots = isolate()->heap()->roots_array_start(); |
+ return current == &roots[Heap::kStoreBufferTopRootIndex] |
+ || current == &roots[Heap::kStackLimitRootIndex] |
+ || current == &roots[Heap::kRealStackLimitRootIndex]; |
+} |
+ |
+ |
void Serializer::VisitPointers(Object** start, Object** end) { |
Isolate* isolate = this->isolate();; |
@@ -1334,8 +1342,7 @@ void Serializer::VisitPointers(Object** start, Object** end) { |
root_index_wave_front_ = |
Max(root_index_wave_front_, static_cast<intptr_t>(current - start)); |
} |
- if (reinterpret_cast<Address>(current) == |
- isolate->heap()->store_buffer()->TopAddress()) { |
+ if (ShouldBeSkipped(current)) { |
sink_->Put(kSkip, "Skip"); |
sink_->PutInt(kPointerSize, "SkipOneWord"); |
} else if ((*current)->IsSmi()) { |