Index: src/json-stringifier.h |
diff --git a/src/json-stringifier.h b/src/json-stringifier.h |
index cbceaaead79c9c1a2f4efdc80fecae95a729089b..393551dd9ad1f80b23c84d7e1a0e4afdd3e27638 100644 |
--- a/src/json-stringifier.h |
+++ b/src/json-stringifier.h |
@@ -97,9 +97,6 @@ class BasicJsonStringifier BASE_EMBEDDED { |
template <typename Char> |
INLINE(static bool DoNotEscape(Char c)); |
- template <typename Char> |
- INLINE(static Vector<const Char> GetCharVector(Handle<String> string)); |
- |
Result StackPush(Handle<Object> object); |
void StackPop(); |
@@ -634,7 +631,7 @@ void BasicJsonStringifier::SerializeString_(Handle<String> string) { |
int worst_case_length = length << 3; |
if (builder_.CurrentPartCanFit(worst_case_length)) { |
DisallowHeapAllocation no_gc; |
- Vector<const SrcChar> vector = GetCharVector<SrcChar>(string); |
+ Vector<const SrcChar> vector = string->GetCharVector<SrcChar>(); |
IncrementalStringBuilder::NoExtendBuilder<DestChar> no_extend( |
&builder_, worst_case_length); |
SerializeStringUnchecked_(vector, &no_extend); |
@@ -666,23 +663,6 @@ bool BasicJsonStringifier::DoNotEscape(uint16_t c) { |
} |
-template <> |
-Vector<const uint8_t> BasicJsonStringifier::GetCharVector( |
- Handle<String> string) { |
- String::FlatContent flat = string->GetFlatContent(); |
- DCHECK(flat.IsOneByte()); |
- return flat.ToOneByteVector(); |
-} |
- |
- |
-template <> |
-Vector<const uc16> BasicJsonStringifier::GetCharVector(Handle<String> string) { |
- String::FlatContent flat = string->GetFlatContent(); |
- DCHECK(flat.IsTwoByte()); |
- return flat.ToUC16Vector(); |
-} |
- |
- |
void BasicJsonStringifier::SerializeString(Handle<String> object) { |
object = String::Flatten(object); |
if (builder_.CurrentEncoding() == String::ONE_BYTE_ENCODING) { |