mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1182979 - Part 3: Use nsTHashtable::Iterator in GMPTimerParent. r=cpearce
This commit is contained in:
parent
19c7c31b38
commit
fce323b4d9
@ -70,21 +70,17 @@ GMPTimerParent::Shutdown()
|
||||
LOGD(("%s::%s: %p mIsOpen=%d", __CLASS__, __FUNCTION__, this, mIsOpen));
|
||||
|
||||
MOZ_ASSERT(mGMPThread == NS_GetCurrentThread());
|
||||
mTimers.EnumerateEntries(GMPTimerParent::CancelTimers, nullptr);
|
||||
|
||||
for (auto iter = mTimers.Iter(); !iter.Done(); iter.Next()) {
|
||||
Context* context = iter.Get()->GetKey();
|
||||
context->mTimer->Cancel();
|
||||
delete context;
|
||||
}
|
||||
|
||||
mTimers.Clear();
|
||||
mIsOpen = false;
|
||||
}
|
||||
|
||||
/*static */
|
||||
PLDHashOperator
|
||||
GMPTimerParent::CancelTimers(nsPtrHashKey<Context>* aContext, void* aClosure)
|
||||
{
|
||||
auto context = aContext->GetKey();
|
||||
context->mTimer->Cancel();
|
||||
delete context;
|
||||
return PL_DHASH_NEXT;
|
||||
}
|
||||
|
||||
void
|
||||
GMPTimerParent::ActorDestroy(ActorDestroyReason aWhy)
|
||||
{
|
||||
|
@ -47,9 +47,6 @@ private:
|
||||
uint32_t mId;
|
||||
};
|
||||
|
||||
static PLDHashOperator
|
||||
CancelTimers(nsPtrHashKey<Context>* aContext, void* aClosure);
|
||||
|
||||
void TimerExpired(Context* aContext);
|
||||
|
||||
nsTHashtable<nsPtrHashKey<Context>> mTimers;
|
||||
|
Loading…
Reference in New Issue
Block a user