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

Unified Diff: runtime/bin/filter.cc

Issue 139043003: - Address warnings about 64-bit to 32-bit conversions. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 11 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 | « runtime/bin/filter.h ('k') | runtime/bin/socket.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/filter.cc
===================================================================
--- runtime/bin/filter.cc (revision 31864)
+++ runtime/bin/filter.cc (working copy)
@@ -60,18 +60,19 @@
Dart_ThrowException(DartUtils::NewInternalError(
"Failed to get 'gzip' parameter"));
}
- int64_t level;
- if (Dart_IsError(Dart_IntegerToInt64(level_obj, &level))) {
+ int64_t level = 0;
+ Dart_Handle result = Dart_IntegerToInt64(level_obj, &level);
+ if (Dart_IsError(result) || (level < kMinInt32) || (level > kMaxInt32)) {
Dart_ThrowException(DartUtils::NewInternalError(
"Failed to get 'level' parameter"));
}
- Filter* filter = new ZLibDeflateFilter(gzip, level);
+ Filter* filter = new ZLibDeflateFilter(gzip, static_cast<int32_t>(level));
if (filter == NULL || !filter->Init()) {
delete filter;
Dart_ThrowException(DartUtils::NewInternalError(
"Failed to create ZLibDeflateFilter"));
}
- Dart_Handle result = Filter::SetFilterPointerNativeField(filter_obj, filter);
+ result = Filter::SetFilterPointerNativeField(filter_obj, filter);
if (Dart_IsError(result)) {
delete filter;
Dart_PropagateError(result);
« no previous file with comments | « runtime/bin/filter.h ('k') | runtime/bin/socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698