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

Side by Side Diff: runtime/bin/eventhandler_win.cc

Issue 10962026: Avoid needless int64_t to intptr_t conversion in eventhandler. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/bin/eventhandler_win.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/eventhandler.h" 5 #include "bin/eventhandler.h"
6 6
7 #include <process.h> 7 #include <process.h>
8 #include <winsock2.h> 8 #include <winsock2.h>
9 #include <ws2tcpip.h> 9 #include <ws2tcpip.h>
10 #include <mswsock.h> 10 #include <mswsock.h>
(...skipping 828 matching lines...) Expand 10 before | Expand all | Expand 10 after
839 if (timeout_ == kInfinityTimeout) { 839 if (timeout_ == kInfinityTimeout) {
840 return kInfinityTimeout; 840 return kInfinityTimeout;
841 } 841 }
842 intptr_t millis = timeout_ - GetCurrentTimeMilliseconds(); 842 intptr_t millis = timeout_ - GetCurrentTimeMilliseconds();
843 return (millis < 0) ? 0 : millis; 843 return (millis < 0) ? 0 : millis;
844 } 844 }
845 845
846 846
847 void EventHandlerImplementation::SendData(intptr_t id, 847 void EventHandlerImplementation::SendData(intptr_t id,
848 Dart_Port dart_port, 848 Dart_Port dart_port,
849 intptr_t data) { 849 int64_t data) {
850 InterruptMessage* msg = new InterruptMessage; 850 InterruptMessage* msg = new InterruptMessage;
851 msg->id = id; 851 msg->id = id;
852 msg->dart_port = dart_port; 852 msg->dart_port = dart_port;
853 msg->data = data; 853 msg->data = data;
854 BOOL ok = PostQueuedCompletionStatus( 854 BOOL ok = PostQueuedCompletionStatus(
855 completion_port_, 0, NULL, reinterpret_cast<OVERLAPPED*>(msg)); 855 completion_port_, 0, NULL, reinterpret_cast<OVERLAPPED*>(msg));
856 if (!ok) { 856 if (!ok) {
857 FATAL("PostQueuedCompletionStatus failed"); 857 FATAL("PostQueuedCompletionStatus failed");
858 } 858 }
859 } 859 }
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
921 // Initialize Winsock32 921 // Initialize Winsock32
922 if (!Socket::Initialize()) { 922 if (!Socket::Initialize()) {
923 FATAL("Failed to initialized Windows sockets"); 923 FATAL("Failed to initialized Windows sockets");
924 } 924 }
925 } 925 }
926 926
927 927
928 void EventHandlerImplementation::Shutdown() { 928 void EventHandlerImplementation::Shutdown() {
929 SendData(kShutdownId, 0, 0); 929 SendData(kShutdownId, 0, 0);
930 } 930 }
OLDNEW
« no previous file with comments | « runtime/bin/eventhandler_win.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698