Follow up fixes for r9205: shared library build and thread deletion.
authorvitalyr@chromium.org <vitalyr@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 8 Sep 2011 23:43:36 +0000 (23:43 +0000)
committervitalyr@chromium.org <vitalyr@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 8 Sep 2011 23:43:36 +0000 (23:43 +0000)
Review URL: http://codereview.chromium.org/7787013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9206 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/d8.cc

index 160ffa3..ffe64ef 100644 (file)
--- 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();
   }