v8/test/unittests/regress/regress-crbug-1056054-unittest.cc
Georg Neis aaab2aca0d [runtime] Use release/acquire for JSGlobalObject's global dictionary
Bug: v8:7790
Change-Id: I4b6ef907c66bdc0a327d211db2f86ebb75f969a7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2536638
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71183}
2020-11-13 16:12:39 +00:00

27 lines
921 B
C++

// Copyright 2020 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "src/execution/isolate.h"
#include "src/heap/factory.h"
#include "test/unittests/test-utils.h"
namespace v8 {
namespace internal {
using EnumIndexOverflowTest = TestWithNativeContextAndZone;
TEST_F(EnumIndexOverflowTest, GlobalObject) {
Handle<GlobalDictionary> dictionary(
isolate()->global_object()->global_dictionary(kAcquireLoad), isolate());
dictionary->set_next_enumeration_index(
PropertyDetails::DictionaryStorageField::kMax);
Handle<Object> value(Smi::FromInt(static_cast<int>(42)), isolate());
Handle<Name> name = factory()->InternalizeUtf8String("eeeee");
JSObject::AddProperty(isolate(), isolate()->global_object(), name, value,
NONE);
}
} // namespace internal
} // namespace v8