Commit 7fd7bbdc authored by yangguo@chromium.org's avatar yangguo@chromium.org

Fix potential assertion failure.

R=mvstanton@chromium.org
BUG=

Review URL: https://codereview.chromium.org/68913002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17621 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent c304afe5
......@@ -310,8 +310,7 @@ Handle<String> ConcatStringContent(Handle<StringType> result,
Handle<String> Factory::NewFlatConcatString(Handle<String> first,
Handle<String> second) {
int total_length = first->length() + second->length();
if (first->IsOneByteRepresentationUnderneath() &&
second->IsOneByteRepresentationUnderneath()) {
if (first->IsOneByteRepresentation() && second->IsOneByteRepresentation()) {
return ConcatStringContent<uint8_t>(
NewRawOneByteString(total_length), first, second);
} else {
......
......@@ -8339,11 +8339,6 @@ SmartArrayPointer<char> 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()) {
......
......@@ -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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment