Reviewers: Yang,
Description:
Make sure that the TimerEventScope is destroyed before we signal completion
Otherwise, the isolate that is referenced by the scope might already be
gone
BUG=v8:3608
[email protected]
LOG=n
Please review this at https://codereview.chromium.org/836413005/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+16, -13 lines):
M src/optimizing-compiler-thread.cc
Index: src/optimizing-compiler-thread.cc
diff --git a/src/optimizing-compiler-thread.cc
b/src/optimizing-compiler-thread.cc
index
6926f47ef29e4dda1c57ca5cf7e4b75e81971d04..a81ba90321a69391cb0c10290bfea57f1f8d2fa2
100644
--- a/src/optimizing-compiler-thread.cc
+++ b/src/optimizing-compiler-thread.cc
@@ -53,25 +53,28 @@ class OptimizingCompilerThread::CompileTask : public
v8::Task {
DisallowHandleAllocation no_handles;
DisallowHandleDereference no_deref;
- TimerEventScope<TimerEventRecompileConcurrent> timer(isolate_);
+ {
+ TimerEventScope<TimerEventRecompileConcurrent> timer(isolate_);
- OptimizingCompilerThread* thread =
isolate_->optimizing_compiler_thread();
+ OptimizingCompilerThread* thread =
isolate_->optimizing_compiler_thread();
- if (thread->recompilation_delay_ != 0) {
- base::OS::Sleep(thread->recompilation_delay_);
- }
+ if (thread->recompilation_delay_ != 0) {
+ base::OS::Sleep(thread->recompilation_delay_);
+ }
- StopFlag flag;
- OptimizedCompileJob* job = thread->NextInput(&flag);
+ StopFlag flag;
+ OptimizedCompileJob* job = thread->NextInput(&flag);
- if (flag == CONTINUE) {
- thread->CompileNext(job);
- } else {
- AllowHandleDereference allow_handle_dereference;
- if (!job->info()->is_osr()) {
- DisposeOptimizedCompileJob(job, true);
+ if (flag == CONTINUE) {
+ thread->CompileNext(job);
+ } else {
+ AllowHandleDereference allow_handle_dereference;
+ if (!job->info()->is_osr()) {
+ DisposeOptimizedCompileJob(job, true);
+ }
}
}
+
bool signal = false;
{
base::LockGuard<base::RecursiveMutex>
lock(&thread->task_count_mutex_);
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.