Index: test/cctest/test-threads.cc |
diff --git a/test/cctest/test-threads.cc b/test/cctest/test-threads.cc |
index e1a48ae53f9a2e5536dd8d986edb9bfaae5f14f3..713d1e842509f919781322e0b09cf8c8e727ecac 100644 |
--- a/test/cctest/test-threads.cc |
+++ b/test/cctest/test-threads.cc |
@@ -63,7 +63,7 @@ enum Turn { |
static Turn turn = FILL_CACHE; |
-class ThreadA: public v8::internal::Thread { |
+class ThreadA : public v8::internal::Thread { |
public: |
ThreadA() : Thread("ThreadA") { } |
void Run() { |
@@ -99,7 +99,7 @@ class ThreadA: public v8::internal::Thread { |
}; |
-class ThreadB: public v8::internal::Thread { |
+class ThreadB : public v8::internal::Thread { |
public: |
ThreadB() : Thread("ThreadB") { } |
void Run() { |
@@ -190,3 +190,19 @@ TEST(ThreadIdValidation) { |
delete threads[i]; |
} |
} |
+ |
+ |
+class ThreadC : public v8::internal::Thread { |
+ public: |
+ ThreadC() : Thread("ThreadC") { } |
+ void Run() { |
+ Join(); |
+ } |
+}; |
+ |
+ |
+TEST(ThreadJoinSelf) { |
+ ThreadC thread; |
+ thread.Start(); |
+ thread.Join(); |
+} |