Commit 9e2f3f86 authored by Maya Lekova's avatar Maya Lekova Committed by Commit Bot

[gcmole] Handlify test-api.cc

Bug: v8:9994
Change-Id: I662182a252c2aab053f6c821bf281f613316700a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2207143
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Auto-Submit: Maya Lekova <mslekova@chromium.org>
Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67869}
parent 72ae7f48
......@@ -14622,10 +14622,10 @@ THREADED_TEST(MorphCompositeStringTest) {
CHECK(lhs->IsOneByte());
CHECK(rhs->IsOneByte());
i::String ilhs = *v8::Utils::OpenHandle(*lhs);
i::String irhs = *v8::Utils::OpenHandle(*rhs);
MorphAString(ilhs, &one_byte_resource, &uc16_resource);
MorphAString(irhs, &one_byte_resource, &uc16_resource);
i::Handle<i::String> ilhs = v8::Utils::OpenHandle(*lhs);
i::Handle<i::String> irhs = v8::Utils::OpenHandle(*rhs);
MorphAString(*ilhs, &one_byte_resource, &uc16_resource);
MorphAString(*irhs, &one_byte_resource, &uc16_resource);
// This should UTF-8 without flattening, since everything is ASCII.
Local<String> cons =
......@@ -14670,14 +14670,14 @@ THREADED_TEST(MorphCompositeStringTest) {
.FromJust());
// This avoids the GC from trying to free a stack allocated resource.
if (ilhs.IsExternalOneByteString())
i::ExternalOneByteString::cast(ilhs).SetResource(i_isolate, nullptr);
if (ilhs->IsExternalOneByteString())
i::ExternalOneByteString::cast(*ilhs).SetResource(i_isolate, nullptr);
else
i::ExternalTwoByteString::cast(ilhs).SetResource(i_isolate, nullptr);
if (irhs.IsExternalOneByteString())
i::ExternalOneByteString::cast(irhs).SetResource(i_isolate, nullptr);
i::ExternalTwoByteString::cast(*ilhs).SetResource(i_isolate, nullptr);
if (irhs->IsExternalOneByteString())
i::ExternalOneByteString::cast(*irhs).SetResource(i_isolate, nullptr);
else
i::ExternalTwoByteString::cast(irhs).SetResource(i_isolate, nullptr);
i::ExternalTwoByteString::cast(*irhs).SetResource(i_isolate, nullptr);
}
i::DeleteArray(two_byte_string);
}
......
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