Reviewers: bak, Description: Push fix for issue 1439135 to trunk as V8 version 0.3.5.2.
Please review this at http://codereview.chromium.org/7810 SVN Base: http://v8.googlecode.com/svn/trunk/ Affected files: M src/api.cc M src/objects.cc Index: src/api.cc =================================================================== --- src/api.cc (revision 529) +++ src/api.cc (working copy) @@ -2216,7 +2216,7 @@ const char* v8::V8::GetVersion() { - return "0.3.5.1"; + return "0.3.5.2"; } Index: src/objects.cc =================================================================== --- src/objects.cc (revision 529) +++ src/objects.cc (working copy) @@ -510,6 +510,12 @@ ASSERT(!ss->buffer()->IsSlicedString()); Object* ok = String::cast(ss->buffer())->Flatten(); if (ok->IsFailure()) return ok; + // Under certain circumstances (TryFlatten fails in String::Slice) + // we can have a cons string under a slice. In this case we need + // to get the flat string out of the cons! + if (String::cast(ok)->StringIsConsString()) { + ss->set_buffer(ConsString::cast(ok)->first()); + } return this; } case kConsStringTag: { --~--~---------~--~----~------------~-------~--~----~ v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev -~----------~----~----~----~------~----~------~--~---
