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

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

Issue 17543002: Clean up queued compilation tasks when quitting. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/optimizing-compiler-thread.cc
diff --git a/src/optimizing-compiler-thread.cc b/src/optimizing-compiler-thread.cc
index e092248b6f56613ee3b196bf08a0fd701bfade32..99f7bc6fdfac8f3560a856f40a7bcbae2c146635 100644
--- a/src/optimizing-compiler-thread.cc
+++ b/src/optimizing-compiler-thread.cc
@@ -106,12 +106,15 @@ void OptimizingCompilerThread::Stop() {
stop_semaphore_->Wait();
if (FLAG_parallel_recompilation_delay != 0) {
- InstallOptimizedFunctions();
// Barrier when loading queue length is not necessary since the write
// happens in CompileNext on the same thread.
- while (NoBarrier_Load(&queue_length_) > 0) {
- CompileNext();
- InstallOptimizedFunctions();
+ while (NoBarrier_Load(&queue_length_) > 0) CompileNext();
+ InstallOptimizedFunctions();
+ } else {
+ OptimizingCompiler* optimizing_compiler;
+ while (input_queue_.Dequeue(&optimizing_compiler)) {
+ // The optimizing compiler is allocated in the CompilationInfo's zone.
+ delete optimizing_compiler->info();
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698