diff --git a/xpcom/tests/TestThreadPoolListener.cpp b/xpcom/tests/TestThreadPoolListener.cpp index 2730885cd87..0a8d69da60d 100644 --- a/xpcom/tests/TestThreadPoolListener.cpp +++ b/xpcom/tests/TestThreadPoolListener.cpp @@ -104,7 +104,7 @@ Listener::OnThreadCreated() NS_IMETHODIMP Listener::OnThreadShuttingDown() { - nsIThread* current = NS_GetCurrentThread(); + nsCOMPtr current(do_GetCurrentThread()); NS_ASSERTION(current, "Couldn't get current thread!"); nsAutoMonitor mon(gMonitor);