Reversing the change to ConstString::IsAsciiRepresentation would probably have
been an easier fix, but I think this is the better one.


http://codereview.chromium.org/2858033/diff/1/5
File test/cctest/test-api.cc (right):

http://codereview.chromium.org/2858033/diff/1/5#newcode10980
test/cctest/test-api.cc:10980: i::String::cast(string->TryFlatten());
Only if flattening succeeds, otherwise it just returns the original
cons-string. Likewise for TryFlatten, which returns the failure if
flattenings fails.

I have added a new FlattenGetString that flattens unconditionally and
returns the non-cons string instead.

http://codereview.chromium.org/2858033/diff/1/5#newcode10985
test/cctest/test-api.cc:10985: uint16_t *uc16_buffer = new
uint16_t[length + 1];
Good catch. Fixed.

http://codereview.chromium.org/2858033/show

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to