Chromium Code Reviews| Index: src/heap-inl.h |
| diff --git a/src/heap-inl.h b/src/heap-inl.h |
| index e5f290086fe06920ecf13598d115b57652641d0d..f28324261841aea9aebb43e6446d8371049b70a9 100644 |
| --- a/src/heap-inl.h |
| +++ b/src/heap-inl.h |
| @@ -101,9 +101,9 @@ MaybeObject* Heap::AllocateStringFromUtf8(Vector<const char> str, |
| MaybeObject* Heap::AllocateSymbol(Vector<const char> str, |
| int chars, |
| uint32_t hash_field) { |
| - unibrow::Utf8InputBuffer<> buffer(str.start(), |
| - static_cast<unsigned>(str.length())); |
| - return AllocateInternalSymbol(&buffer, chars, hash_field); |
| + // Must be ascii. |
| + if (chars == str.length()) return AllocateAsciiSymbol(str, hash_field); |
|
Yang
2012/12/17 14:30:34
Maybe we could encapsulate this logic by replacing
|
| + return AllocateInternalSymbol(str, chars, hash_field); |
| } |