[cctest] Fix -Wshadow warnings in test-weakmaps test-weaksets
No functionality change expected. Most scopes are renamed new_scope. Bug: v8:12244,v8:12245 Change-Id: I85d23b0ba6971f51b9bbfc1f3afeb89fb70f035e Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3227268 Commit-Queue: Zhi An Ng <zhin@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/main@{#77443}
This commit is contained in:
parent
9611ceafda
commit
56540024e1
@ -68,7 +68,7 @@ TEST(Weakness) {
|
||||
// Keep global reference to the key.
|
||||
Handle<Object> key;
|
||||
{
|
||||
HandleScope scope(isolate);
|
||||
HandleScope inner_scope(isolate);
|
||||
Handle<Map> map = factory->NewMap(JS_OBJECT_TYPE, JSObject::kHeaderSize);
|
||||
Handle<JSObject> object = factory->NewJSObjectFromMap(map);
|
||||
key = global_handles->Create(*object);
|
||||
@ -77,7 +77,7 @@ TEST(Weakness) {
|
||||
|
||||
// Put two chained entries into weak map.
|
||||
{
|
||||
HandleScope scope(isolate);
|
||||
HandleScope inner_scope(isolate);
|
||||
Handle<Map> map = factory->NewMap(JS_OBJECT_TYPE, JSObject::kHeaderSize);
|
||||
Handle<JSObject> object = factory->NewJSObjectFromMap(map);
|
||||
Handle<Smi> smi(Smi::FromInt(23), isolate);
|
||||
@ -122,7 +122,7 @@ TEST(Shrinking) {
|
||||
|
||||
// Fill up weak map to trigger capacity change.
|
||||
{
|
||||
HandleScope scope(isolate);
|
||||
HandleScope inner_scope(isolate);
|
||||
Handle<Map> map = factory->NewMap(JS_OBJECT_TYPE, JSObject::kHeaderSize);
|
||||
for (int i = 0; i < 32; i++) {
|
||||
Handle<JSObject> object = factory->NewJSObjectFromMap(map);
|
||||
@ -249,7 +249,7 @@ TEST(Regress2060a) {
|
||||
|
||||
// Fill up weak map with values on an evacuation candidate.
|
||||
{
|
||||
HandleScope scope(isolate);
|
||||
HandleScope inner_scope(isolate);
|
||||
for (int i = 0; i < 32; i++) {
|
||||
Handle<JSObject> object =
|
||||
factory->NewJSObject(function, AllocationType::kOld);
|
||||
@ -320,7 +320,7 @@ TEST(Regress399527) {
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
Heap* heap = isolate->heap();
|
||||
{
|
||||
HandleScope scope(isolate);
|
||||
HandleScope inner_scope(isolate);
|
||||
isolate->factory()->NewJSWeakMap();
|
||||
heap::SimulateIncrementalMarking(heap);
|
||||
}
|
||||
@ -343,7 +343,7 @@ TEST(WeakMapsWithChainedEntries) {
|
||||
v8::Global<v8::Object> g1;
|
||||
v8::Global<v8::Object> g2;
|
||||
{
|
||||
v8::HandleScope scope(isolate);
|
||||
v8::HandleScope inner_scope(isolate);
|
||||
v8::Local<v8::Object> o1 = v8::Object::New(isolate);
|
||||
g1.Reset(isolate, o1);
|
||||
g1.SetWeak();
|
||||
|
@ -83,7 +83,7 @@ TEST(WeakSet_Weakness) {
|
||||
// Keep global reference to the key.
|
||||
Handle<Object> key;
|
||||
{
|
||||
HandleScope scope(isolate);
|
||||
HandleScope inner_scope(isolate);
|
||||
Handle<Map> map = factory->NewMap(JS_OBJECT_TYPE, JSObject::kHeaderSize);
|
||||
Handle<JSObject> object = factory->NewJSObjectFromMap(map);
|
||||
key = global_handles->Create(*object);
|
||||
@ -92,7 +92,7 @@ TEST(WeakSet_Weakness) {
|
||||
|
||||
// Put entry into weak set.
|
||||
{
|
||||
HandleScope scope(isolate);
|
||||
HandleScope inner_scope(isolate);
|
||||
Handle<Smi> smi(Smi::FromInt(23), isolate);
|
||||
int32_t hash = key->GetOrCreateHash(isolate).value();
|
||||
JSWeakCollection::Set(weakset, key, smi, hash);
|
||||
@ -133,7 +133,7 @@ TEST(WeakSet_Shrinking) {
|
||||
|
||||
// Fill up weak set to trigger capacity change.
|
||||
{
|
||||
HandleScope scope(isolate);
|
||||
HandleScope inner_scope(isolate);
|
||||
Handle<Map> map = factory->NewMap(JS_OBJECT_TYPE, JSObject::kHeaderSize);
|
||||
for (int i = 0; i < 32; i++) {
|
||||
Handle<JSObject> object = factory->NewJSObjectFromMap(map);
|
||||
@ -183,7 +183,7 @@ TEST(WeakSet_Regress2060a) {
|
||||
|
||||
// Fill up weak set with values on an evacuation candidate.
|
||||
{
|
||||
HandleScope scope(isolate);
|
||||
HandleScope inner_scope(isolate);
|
||||
for (int i = 0; i < 32; i++) {
|
||||
Handle<JSObject> object =
|
||||
factory->NewJSObject(function, AllocationType::kOld);
|
||||
|
Loading…
Reference in New Issue
Block a user