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

Side by Side Diff: runtime/vm/port.h

Issue 217693002: - Make ports be less predictable. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 8 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
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 VM_PORT_H_ 5 #ifndef VM_PORT_H_
6 #define VM_PORT_H_ 6 #define VM_PORT_H_
7 7
8 #include "include/dart_api.h" 8 #include "include/dart_api.h"
9 #include "vm/allocation.h" 9 #include "vm/allocation.h"
10 #include "vm/globals.h" 10 #include "vm/globals.h"
11 #include "vm/random.h"
11 12
12 namespace dart { 13 namespace dart {
13 14
14 class Isolate; 15 class Isolate;
15 class Message; 16 class Message;
16 class MessageHandler; 17 class MessageHandler;
17 class Mutex; 18 class Mutex;
18 class PortMapTestPeer; 19 class PortMapTestPeer;
19 20
20 class PortMap: public AllStatic { 21 class PortMap: public AllStatic {
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 // Lock protecting access to the port map. 76 // Lock protecting access to the port map.
76 static Mutex* mutex_; 77 static Mutex* mutex_;
77 78
78 // Hashmap of ports. 79 // Hashmap of ports.
79 static Entry* map_; 80 static Entry* map_;
80 static MessageHandler* deleted_entry_; 81 static MessageHandler* deleted_entry_;
81 static intptr_t capacity_; 82 static intptr_t capacity_;
82 static intptr_t used_; 83 static intptr_t used_;
83 static intptr_t deleted_; 84 static intptr_t deleted_;
84 85
85 static Dart_Port next_port_; 86 static Random* prng_;
86 }; 87 };
87 88
88 } // namespace dart 89 } // namespace dart
89 90
90 #endif // VM_PORT_H_ 91 #endif // VM_PORT_H_
OLDNEW
« no previous file with comments | « runtime/vm/message_handler.cc ('k') | runtime/vm/port.cc » ('j') | runtime/vm/port.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698