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

Unified Diff: src/optimizing-compiler-thread.h

Issue 11418138: Fix valgrind warnings. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 1 month 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
Index: src/optimizing-compiler-thread.h
diff --git a/src/optimizing-compiler-thread.h b/src/optimizing-compiler-thread.h
index 8a39b39a47d9002058ef865531b04c660d014a9d..2d56d1a72ba26ee0daedf252cb6cc3111a0fe800 100644
--- a/src/optimizing-compiler-thread.h
+++ b/src/optimizing-compiler-thread.h
@@ -44,6 +44,9 @@ class OptimizingCompilerThread : public Thread {
public:
explicit OptimizingCompilerThread(Isolate *isolate) :
Thread("OptimizingCompilerThread"),
+#ifdef DEBUG
+ thread_id_(0),
Yang 2012/11/23 15:46:20 Initialize this to make valgrind happy.
+#endif
isolate_(isolate),
stop_semaphore_(OS::CreateSemaphore(0)),
input_queue_semaphore_(OS::CreateSemaphore(0)),
@@ -81,12 +84,16 @@ class OptimizingCompilerThread : public Thread {
#endif
~OptimizingCompilerThread() {
- delete input_queue_semaphore_;
delete output_queue_semaphore_; // Only used for manual mode.
+ delete input_queue_semaphore_;
delete stop_semaphore_;
}
private:
+#ifdef DEBUG
+ int thread_id_;
+#endif
+
Isolate* isolate_;
Semaphore* stop_semaphore_;
Semaphore* input_queue_semaphore_;
@@ -97,10 +104,6 @@ class OptimizingCompilerThread : public Thread {
volatile Atomic32 queue_length_;
int64_t time_spent_compiling_;
int64_t time_spent_total_;
-
-#ifdef DEBUG
- int thread_id_;
-#endif
};
} } // namespace v8::internal

Powered by Google App Engine
This is Rietveld 408576698