| Index: third_party/WebKit/Source/platform/heap/Heap.h
|
| diff --git a/third_party/WebKit/Source/platform/heap/Heap.h b/third_party/WebKit/Source/platform/heap/Heap.h
|
| index e3b7bf09c8f218d57ef52c633fa6a3bf5c0ded0e..06bc3314acfeb238a5d045026c8034f304bda00f 100644
|
| --- a/third_party/WebKit/Source/platform/heap/Heap.h
|
| +++ b/third_party/WebKit/Source/platform/heap/Heap.h
|
| @@ -277,11 +277,22 @@ public:
|
| {
|
| static_assert(IsGarbageCollectedType<T>::value, "only objects deriving from GarbageCollected can be used.");
|
| BasePage* page = pageFromObject(objectPointer);
|
| + // Page has been swept and it is still alive.
|
| if (page->hasBeenSwept())
|
| return false;
|
| ASSERT(page->arena()->getThreadState()->isSweepingInProgress());
|
|
|
| - return !ThreadHeap::isHeapObjectAlive(const_cast<T*>(objectPointer));
|
| + // If marked and alive, the object hasn't yet been swept..and won't
|
| + // be once its page is processed.
|
| + if (ThreadHeap::isHeapObjectAlive(const_cast<T*>(objectPointer)))
|
| + return false;
|
| +
|
| + if (page->isLargeObjectPage())
|
| + return true;
|
| +
|
| + // If the object is unmarked, it may be on the page currently being
|
| + // lazily swept.
|
| + return page->arena()->willObjectBeLazilySwept(page, const_cast<T*>(objectPointer));
|
| }
|
|
|
| // Push a trace callback on the marking stack.
|
|
|