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

Unified Diff: src/v8threads.cc

Issue 113030: X64: Fixed conversion between tread_id (int) and void*. (Closed)
Patch Set: Addressed review comments Created 11 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 | « src/platform.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/v8threads.cc
diff --git a/src/v8threads.cc b/src/v8threads.cc
index 243947636012cf4030782e2b9de472e3d824fe97..838cae772dcd1422050704e2cb69c21a9cb3bc6c 100644
--- a/src/v8threads.cc
+++ b/src/v8threads.cc
@@ -309,13 +309,13 @@ void ThreadManager::MarkCompactEpilogue(bool is_compacting) {
int ThreadManager::CurrentId() {
- return bit_cast<int, void*>(Thread::GetThreadLocal(thread_id_key));
+ return Thread::GetThreadLocalInt(thread_id_key);
}
void ThreadManager::AssignId() {
- if (Thread::GetThreadLocal(thread_id_key) == NULL) {
- Thread::SetThreadLocal(thread_id_key, bit_cast<void*, int>(next_id_++));
+ if (!Thread::HasThreadLocal(thread_id_key)) {
+ Thread::SetThreadLocalInt(thread_id_key, next_id_++);
}
}
« no previous file with comments | « src/platform.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698