Chromium Code Reviews| Index: Source/platform/heap/Heap.cpp |
| diff --git a/Source/platform/heap/Heap.cpp b/Source/platform/heap/Heap.cpp |
| index a25225c2bec962e07edfa8b4c754650f1be0cf4e..b89a61c9a22bd28aedece0fdb0032d071ecc653a 100644 |
| --- a/Source/platform/heap/Heap.cpp |
| +++ b/Source/platform/heap/Heap.cpp |
| @@ -2125,6 +2125,14 @@ Address Heap::checkAndMarkPointer(Visitor* visitor, Address address) |
| return nullptr; |
| } |
| +bool Heap::isObjectAlive(const void* objectPointer) |
| +{ |
| + if (!ThreadState::current()->isSweepingInProgress()) |
| + return true; |
| + |
| + return s_markingVisitor->isMarked(objectPointer); |
|
haraken
2015/01/14 14:29:08
Hmm, what happens in the following case?
(1) Mark
sof
2015/01/14 14:36:19
I suppose we can look at the page & see if it has
haraken
2015/01/14 14:37:44
That would work :)
Also should we use isMarked or
sof
2015/01/14 15:53:32
Actually, if we constrain ourselves to GC objects
sof
2015/01/14 16:06:01
Renamed to isFinalizedObjectAlive() + clarified th
|
| +} |
| + |
| #if ENABLE(GC_PROFILE_MARKING) |
| const GCInfo* Heap::findGCInfo(Address address) |
| { |