зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1049068 - Part 5: Remove unused CallStack params. r=froydnj
--HG-- extra : rebase_source : bb83004815186347253090a334b97f1587997a38
This commit is contained in:
Родитель
fa63ab7ca4
Коммит
fd41273704
|
@ -88,11 +88,10 @@ public:
|
|||
|
||||
// While SQLite Mutexes may be recursive, in our own code we do not want to
|
||||
// treat them as such.
|
||||
CallStack callContext = CallStack();
|
||||
|
||||
CheckAcquire(callContext);
|
||||
CheckAcquire();
|
||||
sqlite3_mutex_enter(mMutex);
|
||||
Acquire(callContext); // Call is protected by us holding the mutex.
|
||||
Acquire(); // Call is protected by us holding the mutex.
|
||||
}
|
||||
|
||||
void unlock()
|
||||
|
|
|
@ -89,7 +89,7 @@ BlockingResourceBase::~BlockingResourceBase()
|
|||
|
||||
|
||||
void
|
||||
BlockingResourceBase::CheckAcquire(const CallStack& aCallContext)
|
||||
BlockingResourceBase::CheckAcquire()
|
||||
{
|
||||
if (mDDEntry->mType == eCondVar) {
|
||||
NS_NOTYETIMPLEMENTED(
|
||||
|
@ -100,7 +100,7 @@ BlockingResourceBase::CheckAcquire(const CallStack& aCallContext)
|
|||
BlockingResourceBase* chainFront = ResourceChainFront();
|
||||
nsAutoPtr<DDT::ResourceAcquisitionArray> cycle(
|
||||
sDeadlockDetector->CheckAcquisition(
|
||||
chainFront ? chainFront->mDDEntry : 0, mDDEntry, aCallContext));
|
||||
chainFront ? chainFront->mDDEntry : 0, mDDEntry));
|
||||
if (!cycle) {
|
||||
return;
|
||||
}
|
||||
|
@ -127,7 +127,7 @@ BlockingResourceBase::CheckAcquire(const CallStack& aCallContext)
|
|||
|
||||
|
||||
void
|
||||
BlockingResourceBase::Acquire(const CallStack& aCallContext)
|
||||
BlockingResourceBase::Acquire()
|
||||
{
|
||||
if (mDDEntry->mType == eCondVar) {
|
||||
NS_NOTYETIMPLEMENTED(
|
||||
|
@ -219,11 +219,9 @@ BlockingResourceBase::PrintCycle(const DDT::ResourceAcquisitionArray* aCycle,
|
|||
void
|
||||
OffTheBooksMutex::Lock()
|
||||
{
|
||||
CallStack callContext = CallStack();
|
||||
|
||||
CheckAcquire(callContext);
|
||||
CheckAcquire();
|
||||
PR_Lock(mLock);
|
||||
Acquire(callContext); // protected by mLock
|
||||
Acquire(); // protected by mLock
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -251,8 +249,6 @@ ReentrantMonitor::Enter()
|
|||
return;
|
||||
}
|
||||
|
||||
CallStack callContext = CallStack();
|
||||
|
||||
// this is sort of a hack around not recording the thread that
|
||||
// owns this monitor
|
||||
if (chainFront) {
|
||||
|
@ -266,7 +262,7 @@ ReentrantMonitor::Enter()
|
|||
" [stack trace unavailable]\n");
|
||||
|
||||
// show the caller why this is potentially bad
|
||||
CheckAcquire(callContext);
|
||||
CheckAcquire();
|
||||
|
||||
PR_EnterMonitor(mReentrantMonitor);
|
||||
++mEntryCount;
|
||||
|
@ -275,10 +271,10 @@ ReentrantMonitor::Enter()
|
|||
}
|
||||
}
|
||||
|
||||
CheckAcquire(callContext);
|
||||
CheckAcquire();
|
||||
PR_EnterMonitor(mReentrantMonitor);
|
||||
NS_ASSERTION(mEntryCount == 0, "ReentrantMonitor isn't free!");
|
||||
Acquire(callContext); // protected by mReentrantMonitor
|
||||
Acquire(); // protected by mReentrantMonitor
|
||||
mEntryCount = 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -155,21 +155,15 @@ protected:
|
|||
* CheckAcquire
|
||||
*
|
||||
* Thread safe.
|
||||
*
|
||||
* @param aCallContext the client's calling context from which the
|
||||
* original acquisition request was made.
|
||||
**/
|
||||
void CheckAcquire(const CallStack& aCallContext);
|
||||
void CheckAcquire();
|
||||
|
||||
/**
|
||||
* Acquire
|
||||
*
|
||||
* *NOT* thread safe. Requires ownership of underlying resource.
|
||||
*
|
||||
* @param aCallContext the client's calling context from which the
|
||||
* original acquisition request was made.
|
||||
**/
|
||||
void Acquire(const CallStack& aCallContext); //NS_NEEDS_RESOURCE(this)
|
||||
void Acquire(); //NS_NEEDS_RESOURCE(this)
|
||||
|
||||
/**
|
||||
* Release
|
||||
|
|
|
@ -298,7 +298,7 @@ public:
|
|||
|
||||
/**
|
||||
* CheckAcquisition This method is called after acquiring |aLast|,
|
||||
* but before trying to acquire |aProposed| from |aCallContext|.
|
||||
* but before trying to acquire |aProposed|.
|
||||
* It determines whether actually trying to acquire |aProposed|
|
||||
* will create problems. It is OK if |aLast| is nullptr; this is
|
||||
* interpreted as |aProposed| being the thread's first acquisition
|
||||
|
@ -316,11 +316,9 @@ public:
|
|||
*
|
||||
* @param aLast Last resource acquired by calling thread (or 0).
|
||||
* @param aProposed Resource calling thread proposes to acquire.
|
||||
* @param aCallContext Calling context whence acquisiton request came.
|
||||
*/
|
||||
ResourceAcquisitionArray* CheckAcquisition(const T* aLast,
|
||||
const T* aProposed,
|
||||
const CallStack& aCallContext)
|
||||
const T* aProposed)
|
||||
{
|
||||
if (!aLast) {
|
||||
// don't check if |0 < aProposed|; just vamoose
|
||||
|
|
Загрузка…
Ссылка в новой задаче