Index: src/heap/objects-visiting-inl.h |
diff --git a/src/heap/objects-visiting-inl.h b/src/heap/objects-visiting-inl.h |
index 872b2dd30c814da322199aa643ad5fe17cbceee2..d2ea1bb30412bde556df7662147950589d8f8718 100644 |
--- a/src/heap/objects-visiting-inl.h |
+++ b/src/heap/objects-visiting-inl.h |
@@ -855,7 +855,9 @@ void Code::CodeIterateBody(ObjectVisitor* v) { |
IteratePointer(v, kDeoptimizationDataOffset); |
IteratePointer(v, kTypeFeedbackInfoOffset); |
IterateNextCodeLink(v, kNextCodeLinkOffset); |
- IteratePointer(v, kConstantPoolOffset); |
+ if (FLAG_enable_ool_constant_pool) { |
+ IteratePointer(v, kConstantPoolOffset); |
+ } |
RelocIterator it(this, mode_mask); |
Isolate* isolate = this->GetIsolate(); |
@@ -892,8 +894,11 @@ void Code::CodeIterateBody(Heap* heap) { |
reinterpret_cast<Object**>(this->address() + kTypeFeedbackInfoOffset)); |
StaticVisitor::VisitNextCodeLink( |
heap, reinterpret_cast<Object**>(this->address() + kNextCodeLinkOffset)); |
- StaticVisitor::VisitPointer( |
- heap, reinterpret_cast<Object**>(this->address() + kConstantPoolOffset)); |
+ if (FLAG_enable_ool_constant_pool) { |
+ StaticVisitor::VisitPointer( |
+ heap, |
+ reinterpret_cast<Object**>(this->address() + kConstantPoolOffset)); |
+ } |
RelocIterator it(this, mode_mask); |