Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(27)

Unified Diff: src/api.cc

Issue 10917065: Fix more windows build warnings. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/cctest/test-api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « no previous file | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698