summaryrefslogtreecommitdiff
path: root/deps/v8/src/handles.cc
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2011-08-26 13:07:04 -0700
committerRyan Dahl <ry@tinyclouds.org>2011-08-26 13:07:04 -0700
commit028908ab7cc576d3013960a4580fcd9bf21cc26e (patch)
tree0bde01f82e9b1622793917ee41db581b7b960833 /deps/v8/src/handles.cc
parent8af0abde3fab7d5e8b64f42c26d3dec06b9bdc68 (diff)
downloadnode-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.cc8
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);
}
}