Index: src/api.cc |
diff --git a/src/api.cc b/src/api.cc |
index c8d5a9c19054aa02c5a73e24a10b58101c0f420f..bbed6107880b3e7ecef39d279dc40c937b28edf9 100644 |
--- a/src/api.cc |
+++ b/src/api.cc |
@@ -4943,15 +4943,17 @@ Local<String> v8::String::NewExternal(ExternalLatin1StringResource* resource, |
ENTER_V8(isolate); |
ASSERT((encoding & kStringEncodingMask) == LATIN1_ENCODING); |
CHECK(resource && resource->data()); |
- bool ascii_hint = (encoding & kAsciiHintMask); |
+ int ascii_hint = (encoding & kAsciiHintMask); |
i::Handle<i::String> result; |
if (ascii_hint == ASCII_HINT || |
(ascii_hint != NOT_ASCII_HINT && |
- i::String::IsAscii(resource->data(), resource->length()))) { |
+ i::String::IsAscii(resource->data(), |
+ static_cast<int>(resource->length())))) { |
// Assert that the ascii hint is correct. |
ASSERT(ascii_hint != ASCII_HINT || |
- i::String::IsAscii(resource->data(), resource->length())); |
+ i::String::IsAscii(resource->data(), |
+ static_cast<int>(resource->length()))); |
result = NewExternalAsciiStringHandle(isolate, resource); |
isolate->heap()->external_string_table()->AddString(*result); |
} else { |
@@ -4959,7 +4961,8 @@ Local<String> v8::String::NewExternal(ExternalLatin1StringResource* resource, |
// since it's not. Instead, we convert it to an internal string and dispose |
// the external resource. |
result = isolate->factory()->NewStringFromLatin1( |
- i::Vector<const char>(resource->data(), resource->length()), |
+ i::Vector<const char>(resource->data(), |
+ static_cast<int>(resource->length())), |
i::NOT_TENURED, |
i::String::NOT_ASCII); |
resource->Dispose(); |