Index: src/frames.cc |
diff --git a/src/frames.cc b/src/frames.cc |
index a57d28bde6c454562dd07e2df0ca6095a36c9940..47b4a1b3249bddb9fe886b38d760610596682abb 100644 |
--- a/src/frames.cc |
+++ b/src/frames.cc |
@@ -1516,10 +1516,6 @@ Code* InnerPointerToCodeCache::GcSafeCastToCode(HeapObject* object, |
Code* InnerPointerToCodeCache::GcSafeFindCodeForInnerPointer( |
Address inner_pointer) { |
Heap* heap = isolate_->heap(); |
- if (!heap->code_space()->Contains(inner_pointer) && |
- !heap->lo_space()->Contains(inner_pointer)) { |
- return nullptr; |
- } |
// Check if the inner pointer points into a large object chunk. |
LargePage* large_page = heap->lo_space()->FindPage(inner_pointer); |
@@ -1527,6 +1523,10 @@ Code* InnerPointerToCodeCache::GcSafeFindCodeForInnerPointer( |
return GcSafeCastToCode(large_page->GetObject(), inner_pointer); |
} |
+ if (!heap->code_space()->Contains(inner_pointer)) { |
+ return nullptr; |
+ } |
+ |
// Iterate through the page until we reach the end or find an object starting |
// after the inner pointer. |
Page* page = Page::FromAddress(inner_pointer); |