Index: src/d8.cc |
diff --git a/src/d8.cc b/src/d8.cc |
index 160ffa316edf90eac24a5fc62a040e979d82e134..ffe64ef3ca0a826fc979883f8f05e373eaa1f084 100644 |
--- a/src/d8.cc |
+++ b/src/d8.cc |
@@ -969,12 +969,14 @@ void ShellThread::Run() { |
SourceGroup::~SourceGroup() { |
+#ifndef V8_SHARED |
delete next_semaphore_; |
next_semaphore_ = NULL; |
delete done_semaphore_; |
done_semaphore_ = NULL; |
delete thread_; |
thread_ = NULL; |
+#endif // V8_SHARED |
} |
@@ -1078,7 +1080,6 @@ void SourceGroup::WaitForThread() { |
if (thread_ == NULL) return; |
if (Shell::options.last_run) { |
thread_->Join(); |
- thread_ = NULL; |
} else { |
done_semaphore_->Wait(); |
} |