From 7c209a555f9397f17ac37b245802e82e5a95461d Mon Sep 17 00:00:00 2001 From: "yangguo@chromium.org" Date: Fri, 11 Nov 2011 17:48:40 +0000 Subject: [PATCH] Fixing build errors. Review URL: http://codereview.chromium.org/8540007 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9981 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/runtime.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/runtime.cc b/src/runtime.cc index 4e6355c..f82cbf1 100644 --- a/src/runtime.cc +++ b/src/runtime.cc @@ -6970,8 +6970,12 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_SparseJoinWithSeparator) { // Find total length of join result. int string_length = 0; bool is_ascii = separator->IsAsciiRepresentation(); - int max_string_length = is_ascii ? SeqAsciiString::kMaxLength - : SeqTwoByteString::kMaxLength; + int max_string_length; + if (is_ascii) { + max_string_length = SeqAsciiString::kMaxLength; + } else { + max_string_length = SeqTwoByteString::kMaxLength; + } bool overflow = false; CONVERT_NUMBER_CHECKED(int, elements_length, Int32, elements_array->length()); -- 2.7.4