diff --git a/src/factory.cc b/src/factory.cc index cccc3e7629..da85b12fc8 100644 --- a/src/factory.cc +++ b/src/factory.cc @@ -310,8 +310,7 @@ Handle ConcatStringContent(Handle result, Handle Factory::NewFlatConcatString(Handle first, Handle second) { int total_length = first->length() + second->length(); - if (first->IsOneByteRepresentationUnderneath() && - second->IsOneByteRepresentationUnderneath()) { + if (first->IsOneByteRepresentation() && second->IsOneByteRepresentation()) { return ConcatStringContent( NewRawOneByteString(total_length), first, second); } else { diff --git a/src/objects.cc b/src/objects.cc index 441c25e70c..e5b4763240 100644 --- a/src/objects.cc +++ b/src/objects.cc @@ -8339,11 +8339,6 @@ SmartArrayPointer String::ToCString(AllowNullsFlag allow_nulls, } -const uc16* String::GetTwoByteData() { - return GetTwoByteData(0); -} - - const uc16* String::GetTwoByteData(unsigned start) { ASSERT(!IsOneByteRepresentationUnderneath()); switch (StringShape(this).representation_tag()) { diff --git a/src/objects.h b/src/objects.h index 3105579e28..0099cb2095 100644 --- a/src/objects.h +++ b/src/objects.h @@ -8611,7 +8611,6 @@ class String: public Name { static const int kMaxShortPrintLength = 1024; // Support for regular expressions. - const uc16* GetTwoByteData(); const uc16* GetTwoByteData(unsigned start); // Helper function for flattening strings.