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

Side by Side Diff: dart/runtime/bin/eventhandler.h

Issue 665823007: Several bugfixes in dart:io's handing of sockets (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Added two spaces as requested Created 6 years, 1 month 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 | « no previous file | dart/runtime/bin/eventhandler_android.cc » ('j') | 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 #ifndef BIN_EVENTHANDLER_H_ 5 #ifndef BIN_EVENTHANDLER_H_
6 #define BIN_EVENTHANDLER_H_ 6 #define BIN_EVENTHANDLER_H_
7 7
8 #include "bin/builtin.h" 8 #include "bin/builtin.h"
9 #include "bin/isolate_data.h" 9 #include "bin/isolate_data.h"
10 10
(...skipping 11 matching lines...) Expand all
22 kCloseEvent = 3, 22 kCloseEvent = 3,
23 kDestroyedEvent = 4, 23 kDestroyedEvent = 4,
24 kCloseCommand = 8, 24 kCloseCommand = 8,
25 kShutdownReadCommand = 9, 25 kShutdownReadCommand = 9,
26 kShutdownWriteCommand = 10, 26 kShutdownWriteCommand = 10,
27 kReturnTokenCommand = 11, 27 kReturnTokenCommand = 11,
28 kListeningSocket = 16, 28 kListeningSocket = 16,
29 kPipe = 17, 29 kPipe = 17,
30 }; 30 };
31 31
32 #define COMMAND_MASK ((1 << kCloseCommand) | \
33 (1 << kShutdownReadCommand) | \
34 (1 << kShutdownWriteCommand) | \
35 (1 << kReturnTokenCommand))
36 #define IS_COMMAND(data, command_bit) \
37 ((data & COMMAND_MASK) == (1 << command_bit)) // NOLINT
38 #define ASSERT_NO_COMMAND(data) ASSERT((data & COMMAND_MASK) == 0) // NOLINT
39 #define TOKEN_COUNT(data) (data & ((1 << kCloseCommand) - 1))
32 40
33 class TimeoutQueue { 41 class TimeoutQueue {
34 private: 42 private:
35 class Timeout { 43 class Timeout {
36 public: 44 public:
37 Timeout(Dart_Port port, int64_t timeout, Timeout* next) 45 Timeout(Dart_Port port, int64_t timeout, Timeout* next)
38 : port_(port), timeout_(timeout), next_(next) {} 46 : port_(port), timeout_(timeout), next_(next) {}
39 47
40 Dart_Port port() const { return port_; } 48 Dart_Port port() const { return port_; }
41 49
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 134
127 private: 135 private:
128 friend class EventHandlerImplementation; 136 friend class EventHandlerImplementation;
129 EventHandlerImplementation delegate_; 137 EventHandlerImplementation delegate_;
130 }; 138 };
131 139
132 } // namespace bin 140 } // namespace bin
133 } // namespace dart 141 } // namespace dart
134 142
135 #endif // BIN_EVENTHANDLER_H_ 143 #endif // BIN_EVENTHANDLER_H_
OLDNEW
« no previous file with comments | « no previous file | dart/runtime/bin/eventhandler_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698