From 54640073f93041ddaaa7cf67b10b4a6cf80b79d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marja=20H=C3=B6ltt=C3=A4?= Date: Wed, 21 Feb 2018 12:22:46 +0100 Subject: [PATCH] [heap] Remove unnecessary Relaxed_Stores in Scavenger. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (Simplifying the code in preparation for in-place weak references.) BUG=v8:7308 Change-Id: I8348e108ae12bcd5b218f2d987f34017a1eb5394 Reviewed-on: https://chromium-review.googlesource.com/928421 Commit-Queue: Marja Hölttä Reviewed-by: Michael Lippautz Cr-Commit-Position: refs/heads/master@{#51424} --- src/heap/scavenger-inl.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/heap/scavenger-inl.h b/src/heap/scavenger-inl.h index b61872074e..6755aab425 100644 --- a/src/heap/scavenger-inl.h +++ b/src/heap/scavenger-inl.h @@ -228,9 +228,8 @@ void Scavenger::ScavengeObject(HeapObject** p, HeapObject* object) { // If the first word is a forwarding address, the object has already been // copied. if (first_word.IsForwardingAddress()) { - HeapObject* dest = first_word.ToForwardingAddress(); - DCHECK(object->GetIsolate()->heap()->InFromSpace(*p)); - base::AsAtomicPointer::Relaxed_Store(p, dest); + DCHECK(heap()->InFromSpace(*p)); + *p = first_word.ToForwardingAddress(); return; }