Fix race condition in test-thread-termination.

The test case failed to stop the preemption thread before destroying the
isolate which led to a race condition where the isolate was accessed
after it had been destroyed.

R=ulan@chromium.org
BUG=v8:2049
TEST=cctest/test-thread-termination/TerminateMultipleV8ThreadsDefaultIsolate

Review URL: https://chromiumcodereview.appspot.com/9969092

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11217 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent d9437722
...@@ -255,6 +255,10 @@ TEST(TerminateMultipleV8ThreadsDefaultIsolate) { ...@@ -255,6 +255,10 @@ TEST(TerminateMultipleV8ThreadsDefaultIsolate) {
threads[i]->Join(); threads[i]->Join();
delete threads[i]; delete threads[i];
} }
{
v8::Locker locker;
v8::Locker::StopPreemption();
}
delete semaphore; delete semaphore;
semaphore = NULL; semaphore = NULL;
......
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