OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #include "bin/dartutils.h" | 5 #include "bin/dartutils.h" |
6 #include "bin/eventhandler.h" | 6 #include "bin/eventhandler.h" |
7 #include "bin/socket.h" | 7 #include "bin/socket.h" |
8 | 8 |
9 #include "include/dart_api.h" | 9 #include "include/dart_api.h" |
10 | 10 |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 Dart_Handle sender = Dart_GetNativeArgument(args, 1); | 65 Dart_Handle sender = Dart_GetNativeArgument(args, 1); |
66 intptr_t id = kInvalidId; | 66 intptr_t id = kInvalidId; |
67 if (Dart_IsNull(sender)) { | 67 if (Dart_IsNull(sender)) { |
68 id = kTimerId; | 68 id = kTimerId; |
69 } else { | 69 } else { |
70 Socket::GetSocketIdNativeField(sender, &id); | 70 Socket::GetSocketIdNativeField(sender, &id); |
71 } | 71 } |
72 handle = Dart_GetNativeArgument(args, 2); | 72 handle = Dart_GetNativeArgument(args, 2); |
73 Dart_Port dart_port = | 73 Dart_Port dart_port = |
74 DartUtils::GetIntegerField(handle, DartUtils::kIdFieldName); | 74 DartUtils::GetIntegerField(handle, DartUtils::kIdFieldName); |
75 intptr_t data = DartUtils::GetIntegerValue(Dart_GetNativeArgument(args, 3)); | 75 int64_t data = DartUtils::GetIntegerValue(Dart_GetNativeArgument(args, 3)); |
76 event_handler->SendData(id, dart_port, data); | 76 event_handler->SendData(id, dart_port, data); |
77 Dart_ExitScope(); | 77 Dart_ExitScope(); |
78 } | 78 } |
OLD | NEW |