Reviewers: ulan,
Description:
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.
[email protected]
BUG=v8:2049
TEST=cctest/test-thread-termination/TerminateMultipleV8ThreadsDefaultIsolate
Please review this at https://chromiumcodereview.appspot.com/9969092/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M test/cctest/test-thread-termination.cc
Index: test/cctest/test-thread-termination.cc
diff --git a/test/cctest/test-thread-termination.cc
b/test/cctest/test-thread-termination.cc
index
1aa57e3081a5d779addf9fe141b77edc7a9ff623..cebabaa97e84fe0076da552d5cd6bd435f14f7bc
100644
--- a/test/cctest/test-thread-termination.cc
+++ b/test/cctest/test-thread-termination.cc
@@ -255,6 +255,10 @@ TEST(TerminateMultipleV8ThreadsDefaultIsolate) {
threads[i]->Join();
delete threads[i];
}
+ {
+ v8::Locker locker;
+ v8::Locker::StopPreemption();
+ }
delete semaphore;
semaphore = NULL;
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev