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

Unified Diff: runtime/vm/os_thread.cc

Issue 1978153002: Uses an open thread handle as the ThreadJoinId on Windows. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Fix test Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/os_thread.h ('k') | runtime/vm/os_thread_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/os_thread.cc
diff --git a/runtime/vm/os_thread.cc b/runtime/vm/os_thread.cc
index 947b7f6955f318d3eef1b39aec80ad2285a38e4f..75a7a31850d3b201fc552bd87481a8e9cd3e208d 100644
--- a/runtime/vm/os_thread.cc
+++ b/runtime/vm/os_thread.cc
@@ -23,7 +23,9 @@ bool OSThread::creation_enabled_ = false;
OSThread::OSThread() :
BaseThread(true),
id_(OSThread::GetCurrentThreadId()),
- join_id_(OSThread::GetCurrentThreadJoinId()),
+#if defined(DEBUG)
+ join_id_(kInvalidThreadJoinId),
+#endif
trace_id_(OSThread::GetCurrentThreadTraceId()),
name_(NULL),
timeline_block_lock_(new Mutex()),
@@ -160,8 +162,8 @@ OSThread* OSThread::CreateAndSetUnknownThread() {
}
-bool OSThread::IsThreadInList(ThreadJoinId join_id) {
- if (join_id == OSThread::kInvalidThreadJoinId) {
+bool OSThread::IsThreadInList(ThreadId id) {
+ if (id == OSThread::kInvalidThreadId) {
return false;
}
OSThreadIterator it;
@@ -169,8 +171,8 @@ bool OSThread::IsThreadInList(ThreadJoinId join_id) {
ASSERT(OSThread::thread_list_lock_->IsOwnedByCurrentThread());
OSThread* t = it.Next();
// An address test is not sufficient because the allocator may recycle
- // the address for another Thread. Test against the thread's join id.
- if (t->join_id() == join_id) {
+ // the address for another Thread. Test against the thread's id.
+ if (t->id() == id) {
return true;
}
}
« no previous file with comments | « runtime/vm/os_thread.h ('k') | runtime/vm/os_thread_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698