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

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

Issue 16000003: Fix some errors in the Android compilation of standalone Dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 7 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_android.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 "platform/globals.h" 5 #include "platform/globals.h"
6 #if defined(TARGET_OS_ANDROID) 6 #if defined(TARGET_OS_ANDROID)
7 7
8 #include "bin/eventhandler.h" 8 #include "bin/eventhandler.h"
9 9
10 #include <errno.h> // NOLINT 10 #include <errno.h> // NOLINT
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 perror("Poll failed"); 389 perror("Poll failed");
390 } 390 }
391 } else { 391 } else {
392 handler->HandleTimeout(); 392 handler->HandleTimeout();
393 handler->HandleEvents(events, result); 393 handler->HandleEvents(events, result);
394 } 394 }
395 } 395 }
396 } 396 }
397 397
398 398
399 void EventHandlerImplementation::Start() { 399 void EventHandlerImplementation::Start(EventHandler* handler) {
400 int result = dart::Thread::Start(&EventHandlerImplementation::Poll, 400 int result = dart::Thread::Start(&EventHandlerImplementation::Poll,
401 reinterpret_cast<uword>(this)); 401 reinterpret_cast<uword>(handler));
402 if (result != 0) { 402 if (result != 0) {
403 FATAL1("Failed to start event handler thread %d", result); 403 FATAL1("Failed to start event handler thread %d", result);
404 } 404 }
405 } 405 }
406 406
407 407
408 void EventHandlerImplementation::Shutdown() { 408 void EventHandlerImplementation::Shutdown() {
409 SendData(kShutdownId, 0, 0); 409 SendData(kShutdownId, 0, 0);
410 } 410 }
411 411
(...skipping 13 matching lines...) Expand all
425 425
426 uint32_t EventHandlerImplementation::GetHashmapHashFromFd(intptr_t fd) { 426 uint32_t EventHandlerImplementation::GetHashmapHashFromFd(intptr_t fd) {
427 // The hashmap does not support keys with value 0. 427 // The hashmap does not support keys with value 0.
428 return dart::Utils::WordHash(fd + 1); 428 return dart::Utils::WordHash(fd + 1);
429 } 429 }
430 430
431 } // namespace bin 431 } // namespace bin
432 } // namespace dart 432 } // namespace dart
433 433
434 #endif // defined(TARGET_OS_ANDROID) 434 #endif // defined(TARGET_OS_ANDROID)
OLDNEW
« no previous file with comments | « runtime/bin/eventhandler_android.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698