| Index: src/heap-inl.h
|
| diff --git a/src/heap-inl.h b/src/heap-inl.h
|
| index deb767e109d3dbb4eea7a61f1505569f0d641a04..92f7c8d1f9f8b2a9c44667fccd02d4d10d8fb174 100644
|
| --- a/src/heap-inl.h
|
| +++ b/src/heap-inl.h
|
| @@ -112,10 +112,12 @@ bool inline Heap::IsOneByte(String* str, int chars) {
|
| }
|
|
|
|
|
| -MaybeObject* Heap::AllocateSymbol(Vector<const char> str,
|
| - int chars,
|
| - uint32_t hash_field) {
|
| - if (IsOneByte(str, chars)) return AllocateAsciiSymbol(str, hash_field);
|
| +MaybeObject* Heap::AllocateSymbolFromUtf8(Vector<const char> str,
|
| + int chars,
|
| + uint32_t hash_field) {
|
| + if (IsOneByte(str, chars)) {
|
| + return AllocateOneByteSymbol(Vector<const uint8_t>::cast(str), hash_field);
|
| + }
|
| return AllocateInternalSymbol<false>(str, chars, hash_field);
|
| }
|
|
|
| @@ -129,7 +131,7 @@ MaybeObject* Heap::AllocateInternalSymbol(T t, int chars, uint32_t hash_field) {
|
| }
|
|
|
|
|
| -MaybeObject* Heap::AllocateAsciiSymbol(Vector<const char> str,
|
| +MaybeObject* Heap::AllocateOneByteSymbol(Vector<const uint8_t> str,
|
| uint32_t hash_field) {
|
| if (str.length() > SeqOneByteString::kMaxLength) {
|
| return Failure::OutOfMemoryException();
|
|
|