Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1274)

Unified Diff: src/objects.cc

Issue 7810: Push fix for issue 1439135 to trunk as V8 version 0.3.5.2. (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: Created 12 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/api.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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: {
« no previous file with comments | « src/api.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698