diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2011-08-26 13:07:04 -0700 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2011-08-26 13:07:04 -0700 |
commit | 028908ab7cc576d3013960a4580fcd9bf21cc26e (patch) | |
tree | 0bde01f82e9b1622793917ee41db581b7b960833 /deps/v8/src/handles.cc | |
parent | 8af0abde3fab7d5e8b64f42c26d3dec06b9bdc68 (diff) | |
download | node-new-028908ab7cc576d3013960a4580fcd9bf21cc26e.tar.gz |
Upgrade V8 to 3.5.8
Diffstat (limited to 'deps/v8/src/handles.cc')
-rw-r--r-- | deps/v8/src/handles.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/deps/v8/src/handles.cc b/deps/v8/src/handles.cc index c9984aa92f..8c6439b227 100644 --- a/deps/v8/src/handles.cc +++ b/deps/v8/src/handles.cc @@ -617,15 +617,17 @@ Handle<FixedArray> CalculateLineEnds(Handle<String> src, { AssertNoAllocation no_heap_allocation; // ensure vectors stay valid. // Dispatch on type of strings. - if (src->IsAsciiRepresentation()) { + String::FlatContent content = src->GetFlatContent(); + ASSERT(content.IsFlat()); + if (content.IsAscii()) { CalculateLineEnds(isolate, &line_ends, - src->ToAsciiVector(), + content.ToAsciiVector(), with_last_line); } else { CalculateLineEnds(isolate, &line_ends, - src->ToUC16Vector(), + content.ToUC16Vector(), with_last_line); } } |