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

Unified Diff: test/cctest/test-threads.cc

Issue 152643006: Make LeakSanitizer happy, part 1. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 10 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 | « test/cctest/test-regexp.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-threads.cc
diff --git a/test/cctest/test-threads.cc b/test/cctest/test-threads.cc
index 41f8b2d4c0ada4bbe8974dd81ab90f5cebb31d49..24fb1d1d75d80e23d1d739eda9221b4e6f0765d2 100644
--- a/test/cctest/test-threads.cc
+++ b/test/cctest/test-threads.cc
@@ -159,18 +159,18 @@ TEST(ThreadIdValidation) {
const int kNThreads = 100;
i::List<ThreadIdValidationThread*> threads(kNThreads);
i::List<i::ThreadId> refs(kNThreads);
- i::Semaphore* semaphore = new i::Semaphore(0);
+ i::Semaphore semaphore(0);
ThreadIdValidationThread* prev = NULL;
for (int i = kNThreads - 1; i >= 0; i--) {
ThreadIdValidationThread* newThread =
- new ThreadIdValidationThread(prev, &refs, i, semaphore);
+ new ThreadIdValidationThread(prev, &refs, i, &semaphore);
threads.Add(newThread);
prev = newThread;
refs.Add(i::ThreadId::Invalid());
}
prev->Start();
for (int i = 0; i < kNThreads; i++) {
- semaphore->Wait();
+ semaphore.Wait();
}
for (int i = 0; i < kNThreads; i++) {
delete threads[i];
« no previous file with comments | « test/cctest/test-regexp.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698