Reviewers: mvstanton,
Description:
Fix potential assertion failure.
[email protected]
BUG=
Please review this at https://codereview.chromium.org/68913002/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+1, -8 lines):
M src/factory.cc
M src/objects.h
M src/objects.cc
Index: src/factory.cc
diff --git a/src/factory.cc b/src/factory.cc
index
cccc3e76297b20a2ade4272efcd978e7d0c2f06b..da85b12fc85dab8f876d1f055bd2d34eef4cf799
100644
--- a/src/factory.cc
+++ b/src/factory.cc
@@ -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 {
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index
441c25e70c649aecb7b54f49d5670c1daf136569..e5b4763240f3f8a4f50449e2fe71a1281d63f343
100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -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()) {
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index
3105579e28f4e3aee5b4b0235247c8a9af11ac61..0099cb2095ec4e37a30447f0156ac96a96f5c2b0
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.
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.