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

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

Issue 2640573003: Resolution for issue #5092: Unit test handle checks consider dangling handles to be valid. (Closed)
Patch Set: Removed Dart API entry for IsValid. Created 3 years, 11 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
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 RUNTIME_VM_THREAD_REGISTRY_H_ 5 #ifndef RUNTIME_VM_THREAD_REGISTRY_H_
6 #define RUNTIME_VM_THREAD_REGISTRY_H_ 6 #define RUNTIME_VM_THREAD_REGISTRY_H_
7 7
8 #include "vm/globals.h" 8 #include "vm/globals.h"
9 #include "vm/growable_array.h" 9 #include "vm/growable_array.h"
10 #include "vm/isolate.h" 10 #include "vm/isolate.h"
(...skipping 22 matching lines...) Expand all
33 void PrepareForGC(); 33 void PrepareForGC();
34 Thread* mutator_thread() const { return mutator_thread_; } 34 Thread* mutator_thread() const { return mutator_thread_; }
35 35
36 #ifndef PRODUCT 36 #ifndef PRODUCT
37 void PrintJSON(JSONStream* stream) const; 37 void PrintJSON(JSONStream* stream) const;
38 #endif 38 #endif
39 39
40 // Calculates the sum of the max memory usage in bytes of each thread. 40 // Calculates the sum of the max memory usage in bytes of each thread.
41 uintptr_t ThreadHighWatermarksTotalLocked() const; 41 uintptr_t ThreadHighWatermarksTotalLocked() const;
42 42
43 bool IsValidHandle(Dart_Handle handle) const;
43 intptr_t CountZoneHandles() const; 44 intptr_t CountZoneHandles() const;
44 intptr_t CountScopedHandles() const; 45 intptr_t CountScopedHandles() const;
45 46
46 private: 47 private:
47 Thread* active_list() const { return active_list_; } 48 Thread* active_list() const { return active_list_; }
48 Monitor* threads_lock() const { return threads_lock_; } 49 Monitor* threads_lock() const { return threads_lock_; }
49 50
50 Thread* GetFreeThreadLocked(Isolate* isolate, bool is_mutator); 51 Thread* GetFreeThreadLocked(Isolate* isolate, bool is_mutator);
51 void ReturnThreadLocked(bool is_mutator, Thread* thread); 52 void ReturnThreadLocked(bool is_mutator, Thread* thread);
52 void AddToActiveListLocked(Thread* thread); 53 void AddToActiveListLocked(Thread* thread);
(...skipping 23 matching lines...) Expand all
76 Thread* mutator_thread_; 77 Thread* mutator_thread_;
77 78
78 friend class Isolate; 79 friend class Isolate;
79 friend class SafepointHandler; 80 friend class SafepointHandler;
80 DISALLOW_COPY_AND_ASSIGN(ThreadRegistry); 81 DISALLOW_COPY_AND_ASSIGN(ThreadRegistry);
81 }; 82 };
82 83
83 } // namespace dart 84 } // namespace dart
84 85
85 #endif // RUNTIME_VM_THREAD_REGISTRY_H_ 86 #endif // RUNTIME_VM_THREAD_REGISTRY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698