| Index: src/value-serializer.cc
|
| diff --git a/src/value-serializer.cc b/src/value-serializer.cc
|
| index acedb4be329fcdf570785051993adbe95b7bef46..59e9b1031ec91930c0515e3ae1c3af1f1c319af2 100644
|
| --- a/src/value-serializer.cc
|
| +++ b/src/value-serializer.cc
|
| @@ -1261,10 +1261,9 @@ bool ValueDeserializer::ReadExpectedString(Handle<String> expected) {
|
|
|
| // If the bytes are verbatim what is in the flattened string, then the string
|
| // is successfully consumed.
|
| - if (tag == SerializationTag::kUtf8String && flat.IsOneByte()) {
|
| + if (tag == SerializationTag::kOneByteString && flat.IsOneByte()) {
|
| Vector<const uint8_t> chars = flat.ToOneByteVector();
|
| if (byte_length == static_cast<size_t>(chars.length()) &&
|
| - String::IsAscii(chars.begin(), chars.length()) &&
|
| memcmp(bytes.begin(), chars.begin(), byte_length) == 0) {
|
| return true;
|
| }
|
| @@ -1274,6 +1273,13 @@ bool ValueDeserializer::ReadExpectedString(Handle<String> expected) {
|
| memcmp(bytes.begin(), chars.begin(), byte_length) == 0) {
|
| return true;
|
| }
|
| + } else if (tag == SerializationTag::kUtf8String && flat.IsOneByte()) {
|
| + Vector<const uint8_t> chars = flat.ToOneByteVector();
|
| + if (byte_length == static_cast<size_t>(chars.length()) &&
|
| + String::IsAscii(chars.begin(), chars.length()) &&
|
| + memcmp(bytes.begin(), chars.begin(), byte_length) == 0) {
|
| + return true;
|
| + }
|
| }
|
|
|
| position_ = original_position;
|
|
|