| Index: src/d8.cc
|
| diff --git a/src/d8.cc b/src/d8.cc
|
| index 4a10550088fb90e0c3e8783558737fce2a202873..6f41dc423c6fba3d449391894e5cc92bf61223db 100644
|
| --- a/src/d8.cc
|
| +++ b/src/d8.cc
|
| @@ -1220,10 +1220,6 @@ 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
|
| @@ -1284,7 +1280,7 @@ i::Thread::Options SourceGroup::GetThreadOptions() {
|
| void SourceGroup::ExecuteInThread() {
|
| Isolate* isolate = Isolate::New();
|
| do {
|
| - if (next_semaphore_ != NULL) next_semaphore_->Wait();
|
| + next_semaphore_.Wait();
|
| {
|
| Isolate::Scope iscope(isolate);
|
| Locker lock(isolate);
|
| @@ -1304,7 +1300,7 @@ void SourceGroup::ExecuteInThread() {
|
| V8::IdleNotification(kLongIdlePauseInMs);
|
| }
|
| }
|
| - if (done_semaphore_ != NULL) done_semaphore_->Signal();
|
| + done_semaphore_.Signal();
|
| } while (!Shell::options.last_run);
|
| isolate->Dispose();
|
| }
|
| @@ -1315,7 +1311,7 @@ void SourceGroup::StartExecuteInThread() {
|
| thread_ = new IsolateThread(this);
|
| thread_->Start();
|
| }
|
| - next_semaphore_->Signal();
|
| + next_semaphore_.Signal();
|
| }
|
|
|
|
|
| @@ -1324,7 +1320,7 @@ void SourceGroup::WaitForThread() {
|
| if (Shell::options.last_run) {
|
| thread_->Join();
|
| } else {
|
| - done_semaphore_->Wait();
|
| + done_semaphore_.Wait();
|
| }
|
| }
|
| #endif // V8_SHARED
|
|
|