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

Side by Side Diff: src/optimizing-compiler-thread.cc

Issue 935453006: Add back missing allow handle deref scope (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/optimizing-compiler-thread.h" 5 #include "src/optimizing-compiler-thread.h"
6 6
7 #include "src/v8.h" 7 #include "src/v8.h"
8 8
9 #include "src/base/atomicops.h" 9 #include "src/base/atomicops.h"
10 #include "src/full-codegen.h" 10 #include "src/full-codegen.h"
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 OptimizedCompileJob* OptimizingCompilerThread::NextInput( 162 OptimizedCompileJob* OptimizingCompilerThread::NextInput(
163 bool check_if_flushing) { 163 bool check_if_flushing) {
164 base::LockGuard<base::Mutex> access_input_queue_(&input_queue_mutex_); 164 base::LockGuard<base::Mutex> access_input_queue_(&input_queue_mutex_);
165 if (input_queue_length_ == 0) return NULL; 165 if (input_queue_length_ == 0) return NULL;
166 OptimizedCompileJob* job = input_queue_[InputQueueIndex(0)]; 166 OptimizedCompileJob* job = input_queue_[InputQueueIndex(0)];
167 DCHECK_NOT_NULL(job); 167 DCHECK_NOT_NULL(job);
168 input_queue_shift_ = InputQueueIndex(1); 168 input_queue_shift_ = InputQueueIndex(1);
169 input_queue_length_--; 169 input_queue_length_--;
170 if (check_if_flushing) { 170 if (check_if_flushing) {
171 if (static_cast<StopFlag>(base::Acquire_Load(&stop_thread_)) != CONTINUE) { 171 if (static_cast<StopFlag>(base::Acquire_Load(&stop_thread_)) != CONTINUE) {
172 if (!job->info()->is_osr()) DisposeOptimizedCompileJob(job, true); 172 if (!job->info()->is_osr()) {
173 AllowHandleDereference allow_handle_dereference;
174 DisposeOptimizedCompileJob(job, true);
175 }
173 return NULL; 176 return NULL;
174 } 177 }
175 } 178 }
176 return job; 179 return job;
177 } 180 }
178 181
179 182
180 void OptimizingCompilerThread::CompileNext(OptimizedCompileJob* job) { 183 void OptimizingCompilerThread::CompileNext(OptimizedCompileJob* job) {
181 if (!job) return; 184 if (!job) return;
182 185
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 454
452 455
453 bool OptimizingCompilerThread::IsOptimizerThread() { 456 bool OptimizingCompilerThread::IsOptimizerThread() {
454 base::LockGuard<base::Mutex> lock_guard(&thread_id_mutex_); 457 base::LockGuard<base::Mutex> lock_guard(&thread_id_mutex_);
455 return ThreadId::Current().ToInteger() == thread_id_; 458 return ThreadId::Current().ToInteger() == thread_id_;
456 } 459 }
457 #endif 460 #endif
458 461
459 462
460 } } // namespace v8::internal 463 } } // namespace v8::internal
OLDNEW
« 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