Bug 1290156 - Remove the DEBUG-only lockOwner member from vixl::Simulator; r=terrence

The checks that the `lockOwner` member was used for are redundant now that
`js::Mutex` uses `PTHREAD_MUTEX_ERRORCHECK` in `DEBUG` builds.
This commit is contained in:
Nick Fitzgerald 2016-08-01 18:39:44 -07:00
parent 9f15a50ddf
commit 7c44548415
2 changed files with 0 additions and 22 deletions

View File

@ -144,9 +144,6 @@ void Simulator::init(Decoder* decoder, FILE* stream) {
// SilenceExclusiveAccessWarning().
print_exclusive_access_warning_ = true;
#ifdef DEBUG
lockOwner_ = nullptr;
#endif
redirection_ = nullptr;
}
@ -298,23 +295,8 @@ class AutoLockSimulatorCache : public js::LockGuard<js::Mutex>
public:
explicit AutoLockSimulatorCache(Simulator* sim)
: Base(sim->lock_)
, sim_(sim)
{
VIXL_ASSERT(!sim_->lockOwner_);
#ifdef DEBUG
sim_->lockOwner_ = PR_GetCurrentThread();
#endif
}
~AutoLockSimulatorCache() {
#ifdef DEBUG
VIXL_ASSERT(sim_->lockOwner_ == PR_GetCurrentThread());
sim_->lockOwner_ = nullptr;
#endif
}
private:
Simulator* const sim_;
};
@ -384,7 +366,6 @@ class Redirection
void Simulator::setRedirection(Redirection* redirection) {
// VIXL_ASSERT(lockOwner_); TODO
redirection_ = redirection;
}

View File

@ -2668,9 +2668,6 @@ class Simulator : public DecoderVisitor {
protected:
// Moz: Synchronizes access between main thread and compilation threads.
js::Mutex lock_;
#ifdef DEBUG
PRThread* lockOwner_;
#endif
Redirection* redirection_;
mozilla::Vector<int64_t, 0, js::SystemAllocPolicy> spStack_;
};