| Index: test/cctest/test-api.cc
|
| diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
|
| index c9f1f4286686f4f11acb8c7618f8cb29e8a55b07..87cc98ce5a44f870c0f58eced68b6326731d22ca 100644
|
| --- a/test/cctest/test-api.cc
|
| +++ b/test/cctest/test-api.cc
|
| @@ -154,7 +154,7 @@ class ApiTestFuzzer: public v8::internal::Thread {
|
| class RegisterThreadedTest {
|
| public:
|
| explicit RegisterThreadedTest(CcTest::TestFunction* callback)
|
| - : callback_(callback) {
|
| + : fuzzer_(NULL), callback_(callback) {
|
| prev_ = first_;
|
| first_ = this;
|
| count_++;
|
| @@ -5098,6 +5098,10 @@ void ApiTestFuzzer::ContextSwitch() {
|
|
|
| void ApiTestFuzzer::TearDown() {
|
| fuzzing_ = false;
|
| + for (int i = 0; i < RegisterThreadedTest::count(); i++) {
|
| + ApiTestFuzzer *fuzzer = RegisterThreadedTest::nth(i)->fuzzer_;
|
| + if (fuzzer != NULL) fuzzer->Join();
|
| + }
|
| }
|
|
|
|
|
|
|