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
This commit is contained in:
parent
c304afe54d
commit
7fd7bbdcad
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user