| Index: src/frames.cc
|
| diff --git a/src/frames.cc b/src/frames.cc
|
| index cc559cf7c9ef486928d7b1d9495eb438b01289fb..69ec4d4b33f63f979a124d61bc34e3cd265e65b0 100644
|
| --- a/src/frames.cc
|
| +++ b/src/frames.cc
|
| @@ -1162,6 +1162,14 @@ Code* PcToCodeCache::GcSafeCastToCode(HeapObject* object, Address pc) {
|
| }
|
|
|
|
|
| +static int GcSafeSizeOfCodeSpaceObject(HeapObject* object) {
|
| + MapWord map_word = object->map_word();
|
| + Map* map = map_word.IsForwardingAddress() ?
|
| + map_word.ToForwardingAddress()->map() : map_word.ToMap();
|
| + return object->SizeFromMap(map);
|
| +}
|
| +
|
| +
|
| Code* PcToCodeCache::GcSafeFindCodeForPc(Address pc) {
|
| Heap* heap = isolate_->heap();
|
| // Check if the pc points into a large object chunk.
|
| @@ -1171,7 +1179,7 @@ Code* PcToCodeCache::GcSafeFindCodeForPc(Address pc) {
|
| // Iterate through the page until we reach the end or find an object starting
|
| // after the pc.
|
| Page* page = Page::FromAddress(pc);
|
| - HeapObjectIterator iterator(page, heap->GcSafeSizeOfOldObjectFunction());
|
| + HeapObjectIterator iterator(page, &GcSafeSizeOfCodeSpaceObject);
|
| HeapObject* previous = NULL;
|
| while (true) {
|
| HeapObject* next = iterator.Next();
|
|
|