Bug 1202667 - make TaskQueue task running slightly more efficient; r=mccr8

We can transfer the reference out of the queue of runnables instead of
taking a new reference right before we drop the old one.
This commit is contained in:
Nathan Froyd 2015-09-07 20:02:16 -04:00
parent 4ce765e87e
commit fc1aef0cd3

View File

@ -155,7 +155,7 @@ TaskQueue::Runner::Run()
mon.NotifyAll();
return NS_OK;
}
event = mQueue->mTasks.front();
event = mQueue->mTasks.front().forget();
mQueue->mTasks.pop();
}
MOZ_ASSERT(event);