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

Unified Diff: src/api.cc

Issue 9817005: Unbork Windows 64 bit build and guard against overlong UTF-8 (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 9 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
===================================================================
--- src/api.cc (revision 11104)
+++ src/api.cc (working copy)
@@ -3721,7 +3721,7 @@
previous_character = character;
}
*last_character = previous_character;
- return utf8_bytes + current - buffer;
+ return static_cast<int>(utf8_bytes + current - buffer);
}
case i::kSeqStringTag: {
const uint16_t* data =
@@ -3734,7 +3734,7 @@
previous_character = character;
}
*last_character = previous_character;
- return utf8_bytes + current - buffer;
+ return static_cast<int>(utf8_bytes + current - buffer);
}
case i::kSlicedStringTag: {
i::SlicedString* slice = i::SlicedString::cast(string);
@@ -3818,7 +3818,7 @@
return len;
}
- if (capacity == -1 || capacity >= string_length * 3) {
+ if (capacity == -1 || capacity / 3 >= string_length) {
int32_t previous = unibrow::Utf16::kNoPreviousCharacter;
const int kMaxRecursion = 100;
int utf8_bytes =
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698