Also delete optimization jobs in the output queue when stopping thread.
authoryangguo@chromium.org <yangguo@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 1 Jul 2013 15:12:59 +0000 (15:12 +0000)
committeryangguo@chromium.org <yangguo@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 1 Jul 2013 15:12:59 +0000 (15:12 +0000)
R=hpayer@chromium.org
BUG=

Review URL: https://codereview.chromium.org/18364002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15428 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/optimizing-compiler-thread.cc

index dbf9ad7..a4300f5 100644 (file)
@@ -115,8 +115,11 @@ void OptimizingCompilerThread::Stop() {
     InstallOptimizedFunctions();
   } else {
     OptimizingCompiler* optimizing_compiler;
+    // The optimizing compiler is allocated in the CompilationInfo's zone.
     while (input_queue_.Dequeue(&optimizing_compiler)) {
-      // The optimizing compiler is allocated in the CompilationInfo's zone.
+      delete optimizing_compiler->info();
+    }
+    while (output_queue_.Dequeue(&optimizing_compiler)) {
       delete optimizing_compiler->info();
     }
   }