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

cppgc: Fix ConstructionBitProtectsNonAtomicWrites on MSVC

std::atomic loads are marked as nodiscard on MSVC. Fix the warning by
feeding the load into the USE() macro.

Bug: chromium:1056170
Change-Id: I72ca42d42d268c4b961d96618250229a53709472
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2120543Reviewed-by: 's avatarOmer Katz <omerkatz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66866}
parent 2f83184d
......@@ -133,8 +133,8 @@ class ConcurrentGCThread final : public v8::base::Thread {
void Run() final {
while (header_->IsInConstruction<HeapObjectHeader::AccessMode::kAtomic>()) {
}
v8::base::AsAtomicPtr(const_cast<size_t*>(&payload_->value))
->load(std::memory_order_relaxed);
USE(v8::base::AsAtomicPtr(const_cast<size_t*>(&payload_->value))
->load(std::memory_order_relaxed));
}
private:
......
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