Commit 184e7bb8 authored by Deepti Gandluri's avatar Deepti Gandluri Committed by Commit Bot

Remove incorrect length check

The DCHECK in the lookup method compares the stashed length of the backing store
and the byte_length queried on lookup. These two are not guaranteed to be equal
as there can be grow calls that update the lenght of the buffer between the
length being stashed and the equality check.

Bug: chromium:1010272
Change-Id: I754fa0a9ab676cd838e893d12ef6b13fc7d335e1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1911490Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65003}
parent 880ca119
......@@ -629,8 +629,14 @@ std::shared_ptr<BackingStore> GlobalBackingStoreRegistry::Lookup(
return std::shared_ptr<BackingStore>();
}
auto backing_store = result->second.lock();
DCHECK_EQ(buffer_start, backing_store->buffer_start());
DCHECK_EQ(length, backing_store->byte_length());
CHECK_EQ(buffer_start, backing_store->buffer_start());
if (backing_store->is_wasm_memory()) {
// Grow calls to shared WebAssembly threads can be triggered from different
// workers, length equality cannot be guaranteed here.
CHECK_LE(length, backing_store->byte_length());
} else {
CHECK_EQ(length, backing_store->byte_length());
}
return backing_store;
}
......
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