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

[heap] Fix -Wshadow warnings

Bug: v8:12244,v8:12245
Change-Id: I5eb07a60881db655ea70dc83189ed1a0447f0bea
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3278688Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77912}
parent c25070c2
...@@ -60,8 +60,8 @@ void AllocationCounter::RemoveAllocationObserver(AllocationObserver* observer) { ...@@ -60,8 +60,8 @@ void AllocationCounter::RemoveAllocationObserver(AllocationObserver* observer) {
} else { } else {
size_t step_size = 0; size_t step_size = 0;
for (AllocationObserverCounter& observer : observers_) { for (AllocationObserverCounter& observer_counter : observers_) {
size_t left_in_step = observer.next_counter_ - current_counter_; size_t left_in_step = observer_counter.next_counter_ - current_counter_;
DCHECK_GT(left_in_step, 0); DCHECK_GT(left_in_step, 0);
step_size = step_size ? std::min(step_size, left_in_step) : left_in_step; step_size = step_size ? std::min(step_size, left_in_step) : left_in_step;
} }
......
...@@ -741,8 +741,9 @@ void NewSpace::Verify(Isolate* isolate) { ...@@ -741,8 +741,9 @@ void NewSpace::Verify(Isolate* isolate) {
if (object.IsExternalString()) { if (object.IsExternalString()) {
ExternalString external_string = ExternalString::cast(object); ExternalString external_string = ExternalString::cast(object);
size_t size = external_string.ExternalPayloadSize(); size_t string_size = external_string.ExternalPayloadSize();
external_space_bytes[ExternalBackingStoreType::kExternalString] += size; external_space_bytes[ExternalBackingStoreType::kExternalString] +=
string_size;
} }
current += size; current += size;
......
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