From 369780f48e67010dcaff134669d8e732fc83ab00 Mon Sep 17 00:00:00 2001 From: Honza Bambas Date: Thu, 9 Jan 2014 00:27:31 +0100 Subject: [PATCH] Bug 956374 - HTTP cache v2: fix CacheIOThread::Target() wait conditioning, r=michal --- netwerk/cache2/CacheIOThread.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/netwerk/cache2/CacheIOThread.cpp b/netwerk/cache2/CacheIOThread.cpp index 42c11998ae44..415d0b3d5f31 100644 --- a/netwerk/cache2/CacheIOThread.cpp +++ b/netwerk/cache2/CacheIOThread.cpp @@ -114,12 +114,14 @@ void CacheIOThread::ThreadFunc() MonitorAutoLock lock(mMonitor); // This creates nsThread for this PRThread - mXPCOMThread = NS_GetCurrentThread(); + nsCOMPtr xpcomThread = NS_GetCurrentThread(); - threadInternal = do_QueryInterface(mXPCOMThread); + threadInternal = do_QueryInterface(xpcomThread); if (threadInternal) threadInternal->SetObserver(this); + mXPCOMThread.swap(xpcomThread); + lock.NotifyAll(); do {