Commit 6b4ba741 authored by Rodrigo Bruno's avatar Rodrigo Bruno Committed by Commit Bot

Fix update external string call in morph string test.

Bug: chromium:845409
Change-Id: Ic9b1fa0f669c8b9a82ed91d3f348dd070fc9267f
Reviewed-on: https://chromium-review.googlesource.com/1135247
Commit-Queue: Rodrigo Bruno <rfbpb@google.com>
Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54419}
parent f5e8645f
......@@ -15654,9 +15654,7 @@ static void MorphAString(i::String* string,
string->set_map(roots.external_string_map());
i::ExternalTwoByteString* morphed =
i::ExternalTwoByteString::cast(string);
CcTest::heap()->UpdateExternalString(morphed, morphed->resource()->length(),
0);
CcTest::heap()->UpdateExternalString(morphed, string->length(), 0);
morphed->SetResource(uc16_resource);
} else {
// Check old map is not internalized or long.
......@@ -15664,8 +15662,7 @@ static void MorphAString(i::String* string,
// Morph external string to be one-byte string.
string->set_map(roots.external_one_byte_string_map());
i::ExternalOneByteString* morphed = i::ExternalOneByteString::cast(string);
CcTest::heap()->UpdateExternalString(morphed,
morphed->resource()->length() * 2, 0);
CcTest::heap()->UpdateExternalString(morphed, string->length(), 0);
morphed->SetResource(one_byte_resource);
}
}
......
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