Commit c5c02d3b authored by jochen@chromium.org's avatar jochen@chromium.org

Fix race in debugger threads in cctest/test-debug

BUG=none
R=svenpanne@chromium.org, ishell@chromium.org
LOG=n

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24455 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent bb5b3926
...@@ -5264,6 +5264,7 @@ void V8Thread::Run() { ...@@ -5264,6 +5264,7 @@ void V8Thread::Run() {
CompileRun(source); CompileRun(source);
} }
threaded_debugging_barriers.barrier_4.Wait();
isolate_->Dispose(); isolate_->Dispose();
} }
...@@ -5285,6 +5286,7 @@ void DebuggerThread::Run() { ...@@ -5285,6 +5286,7 @@ void DebuggerThread::Run() {
threaded_debugging_barriers.barrier_2.Wait(); threaded_debugging_barriers.barrier_2.Wait();
v8::Debug::SendCommand(isolate_, buffer, AsciiToUtf16(command_1, buffer)); v8::Debug::SendCommand(isolate_, buffer, AsciiToUtf16(command_1, buffer));
v8::Debug::SendCommand(isolate_, buffer, AsciiToUtf16(command_2, buffer)); v8::Debug::SendCommand(isolate_, buffer, AsciiToUtf16(command_2, buffer));
threaded_debugging_barriers.barrier_4.Wait();
} }
...@@ -5388,6 +5390,7 @@ void BreakpointsV8Thread::Run() { ...@@ -5388,6 +5390,7 @@ void BreakpointsV8Thread::Run() {
breakpoints_barriers->barrier_2.Wait(); breakpoints_barriers->barrier_2.Wait();
CompileRun(source_2); CompileRun(source_2);
} }
breakpoints_barriers->barrier_4.Wait();
isolate_->Dispose(); isolate_->Dispose();
} }
...@@ -5503,6 +5506,7 @@ void BreakpointsDebuggerThread::Run() { ...@@ -5503,6 +5506,7 @@ void BreakpointsDebuggerThread::Run() {
CHECK_EQ(116, evaluate_int_result); CHECK_EQ(116, evaluate_int_result);
// 9: Continue evaluation of source2, reach end. // 9: Continue evaluation of source2, reach end.
v8::Debug::SendCommand(isolate_, buffer, AsciiToUtf16(command_8, buffer)); v8::Debug::SendCommand(isolate_, buffer, AsciiToUtf16(command_8, buffer));
breakpoints_barriers->barrier_4.Wait();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment