Commit 1033ab21 authored by Ng Zhi An's avatar Ng Zhi An Committed by V8 LUCI CQ

[objects] Fix -Wshadow warnings

Bug: v8:12244,v8:12245
Change-Id: I1cf8425c213b1ba83df53c4b362bf4d3d7f22de8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3276923Reviewed-by: 's avatarDominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77913}
parent fb4b1efd
......@@ -495,17 +495,18 @@ Handle<String> StringTable::LookupKey(IsolateT* isolate, StringTableKey* key) {
// Load the current string table data, in case another thread updates the
// data while we're reading.
const Data* data = data_.load(std::memory_order_acquire);
const Data* current_data = data_.load(std::memory_order_acquire);
// First try to find the string in the table. This is safe to do even if the
// table is now reallocated; we won't find a stale entry in the old table
// because the new table won't delete it's corresponding entry until the
// string is dead, in which case it will die in this table too and worst
// case we'll have a false miss.
InternalIndex entry = data->FindEntry(isolate, key, key->hash());
InternalIndex entry = current_data->FindEntry(isolate, key, key->hash());
if (entry.is_found()) {
Handle<String> result(String::cast(data->Get(isolate, entry)), isolate);
DCHECK_IMPLIES(FLAG_shared_string_table, result->IsShared());
Handle<String> result(String::cast(current_data->Get(isolate, entry)),
isolate);
DCHECK_IMPLIES(FLAG_shared_string_table, result->InSharedHeap());
return result;
}
......
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