From 444fb073607922eec6f08f704f057d9319df164c Mon Sep 17 00:00:00 2001 From: Nathan Froyd Date: Mon, 7 Sep 2015 20:02:16 -0400 Subject: [PATCH] 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. --- xpcom/threads/TaskQueue.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xpcom/threads/TaskQueue.cpp b/xpcom/threads/TaskQueue.cpp index db7edaecbdb1..33b7998beca4 100644 --- a/xpcom/threads/TaskQueue.cpp +++ b/xpcom/threads/TaskQueue.cpp @@ -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);