Commit ca33118d authored by Michael Lippautz's avatar Michael Lippautz Committed by Commit Bot

[heap] Fix smaller issues in MarkCompactMarkingVisitor

Bug: chromium:750084
Change-Id: I17560b2ab31ad494637a7498a089f4d2b7377907
Reviewed-on: https://chromium-review.googlesource.com/591450Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46971}
parent 52a9b5cb
......@@ -1072,7 +1072,8 @@ class MarkCompactMarkingVisitor final
// Marks the object black without pushing it on the marking stack. Returns
// true if object needed marking and false otherwise.
V8_INLINE bool MarkObjectWithoutPush(HeapObject* host, HeapObject* object) {
if (ObjectMarking::WhiteToBlack(object, MarkingState::Internal(object))) {
if (ObjectMarking::WhiteToBlack(object,
collector_->marking_state(object))) {
if (V8_UNLIKELY(FLAG_track_retaining_path)) {
heap_->AddRetainer(host, object);
}
......@@ -1111,9 +1112,8 @@ class MarkCompactMarkingVisitor final
// Visit an unmarked object.
V8_INLINE void VisitUnmarkedObject(HeapObject* obj) {
DCHECK(heap_->Contains(obj));
if (ObjectMarking::WhiteToBlack(obj, MarkingState::Internal(obj))) {
if (ObjectMarking::WhiteToBlack(obj, collector_->marking_state(obj))) {
Map* map = obj->map();
ObjectMarking::WhiteToBlack(obj, MarkingState::Internal(obj));
// Mark the map pointer and the body.
collector_->MarkObject(obj, map);
Visit(map, obj);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment