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

Unified Diff: runtime/bin/eventhandler.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
Index: runtime/bin/eventhandler.cc
===================================================================
--- runtime/bin/eventhandler.cc (revision 31816)
+++ runtime/bin/eventhandler.cc (working copy)
@@ -92,11 +92,20 @@
} else {
id = Socket::GetSocketIdNativeField(sender);
}
+ // Get the _id field out of the port.
Dart_Handle handle = Dart_GetNativeArgument(args, 1);
- Dart_Port dart_port =
- DartUtils::GetIntegerField(handle, DartUtils::kIdFieldName);
+ handle = Dart_GetField(handle, DartUtils::NewString(DartUtils::kIdFieldName));
Søren Gjesse 2014/01/15 10:38:43 Move this to DartUtils::GetInt64Field.
Ivan Posva 2014/01/16 05:05:41 I strongly believe that we need to significantly r
+ if (Dart_IsError(handle)) {
+ Dart_PropagateError(handle);
+ UNREACHABLE();
+ }
+ Dart_Port dart_port;
+ handle = Dart_IntegerToInt64(handle, &dart_port);
+ if (Dart_IsError(handle)) {
+ Dart_PropagateError(handle);
siva 2014/01/16 00:15:59 UNREACHABLE here like you have above.
Ivan Posva 2014/01/16 05:05:41 Done.
+ }
int64_t data = DartUtils::GetIntegerValue(Dart_GetNativeArgument(args, 2));
- if (id == kTimerId && data == 0) {
+ if ((id == kTimerId) && (data == 0)) {
// This is a 0-timer. Simply queue a 'null' on the port.
DartUtils::PostNull(dart_port);
} else {

Powered by Google App Engine
This is Rietveld 408576698