Commit c96082a2 authored by Shu-yu Guo's avatar Shu-yu Guo Committed by V8 LUCI CQ

[test] Fix StringShare cctest for single generation builds

Bug: v8:12382
Change-Id: I31a9e919db56cf7642b2f5e22352ce3ebe0f6e23
Cq-Include-Trybots: luci.v8.try:v8_linux64_single_generation_dbg_ng
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3278675
Auto-Submit: Shu-yu Guo <syg@chromium.org>
Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77893}
parent b57944e2
......@@ -175,9 +175,9 @@ UNINITIALIZED_TEST(InPlaceInternalization) {
}
UNINITIALIZED_TEST(YoungInternalization) {
if (FLAG_single_generation) return;
if (!ReadOnlyHeap::IsReadOnlySpaceShared()) return;
if (!COMPRESS_POINTERS_IN_SHARED_CAGE_BOOL) return;
if (FLAG_single_generation) return;
FLAG_shared_string_table = true;
......@@ -408,13 +408,15 @@ UNINITIALIZED_TEST(StringShare) {
// All other strings are flattened then copied if the flatten didn't already
// create a new copy.
{
if (!FLAG_single_generation) {
// Young strings
Handle<String> young_one_byte_seq = factory->NewStringFromAsciiChecked(
raw_one_byte, AllocationType::kYoung);
Handle<String> young_two_byte_seq =
factory->NewStringFromTwoByte(two_byte, AllocationType::kYoung)
.ToHandleChecked();
CHECK(Heap::InYoungGeneration(*young_one_byte_seq));
CHECK(Heap::InYoungGeneration(*young_two_byte_seq));
CHECK(!young_one_byte_seq->IsShared());
CHECK(!young_two_byte_seq->IsShared());
Handle<String> shared_one_byte =
......
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