mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
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:
parent
9f15a50ddf
commit
7c44548415
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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_;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user