diff --git a/content/base/src/nsDOMFile.cpp b/content/base/src/nsDOMFile.cpp index c312175661ea..c65a635ce26e 100644 --- a/content/base/src/nsDOMFile.cpp +++ b/content/base/src/nsDOMFile.cpp @@ -35,7 +35,6 @@ #include "mozilla/CheckedInt.h" #include "mozilla/Preferences.h" #include "mozilla/Attributes.h" -#include "nsThreadUtils.h" #include "mozilla/dom/FileListBinding.h" using namespace mozilla; diff --git a/content/base/src/nsDocument.h b/content/base/src/nsDocument.h index a5839cb0ede9..ea30f01336e9 100644 --- a/content/base/src/nsDocument.h +++ b/content/base/src/nsDocument.h @@ -53,6 +53,7 @@ #include "pldhash.h" #include "nsAttrAndChildArray.h" #include "nsDOMAttributeMap.h" +#include "nsThreadUtils.h" #include "nsIContentViewer.h" #include "nsIDOMXPathNSResolver.h" #include "nsIInterfaceRequestor.h" diff --git a/content/base/src/nsInProcessTabChildGlobal.h b/content/base/src/nsInProcessTabChildGlobal.h index 494e96548fb3..903675b6a36f 100644 --- a/content/base/src/nsInProcessTabChildGlobal.h +++ b/content/base/src/nsInProcessTabChildGlobal.h @@ -18,7 +18,7 @@ #include "nsIDocShell.h" #include "nsIDOMElement.h" #include "nsCOMArray.h" -#include "nsIRunnable.h" +#include "nsThreadUtils.h" #include "nsIGlobalObject.h" #include "nsIScriptObjectPrincipal.h" #include "nsWeakReference.h" diff --git a/content/html/content/public/HTMLMediaElement.h b/content/html/content/public/HTMLMediaElement.h index f587fd7dc8b5..d100d8773cfc 100644 --- a/content/html/content/public/HTMLMediaElement.h +++ b/content/html/content/public/HTMLMediaElement.h @@ -11,6 +11,7 @@ #include "MediaDecoderOwner.h" #include "nsIChannel.h" #include "nsIHttpChannel.h" +#include "nsThreadUtils.h" #include "nsIDOMRange.h" #include "nsCycleCollectionParticipant.h" #include "nsILoadGroup.h" @@ -44,7 +45,6 @@ class MediaDecoder; class nsITimer; class nsRange; -class nsIRunnable; namespace mozilla { namespace dom { diff --git a/content/media/dash/DASHDecoder.h b/content/media/dash/DASHDecoder.h index adc9dfd453e5..260e31e1bdd4 100644 --- a/content/media/dash/DASHDecoder.h +++ b/content/media/dash/DASHDecoder.h @@ -18,6 +18,7 @@ #include "nsTArray.h" #include "nsIURI.h" #include "nsITimer.h" +#include "nsThreadUtils.h" #include "MediaDecoder.h" #include "DASHReader.h" diff --git a/dom/camera/CameraCommon.h b/dom/camera/CameraCommon.h index 1f2d418da891..61d28e4effcd 100644 --- a/dom/camera/CameraCommon.h +++ b/dom/camera/CameraCommon.h @@ -19,6 +19,7 @@ #define NAN std::numeric_limits::quiet_NaN() #endif +#include "nsThreadUtils.h" #include "nsIDOMCameraManager.h" #include "prlog.h" diff --git a/dom/file/FileHelper.cpp b/dom/file/FileHelper.cpp index ed95dc14acf8..2c85ab013a78 100644 --- a/dom/file/FileHelper.cpp +++ b/dom/file/FileHelper.cpp @@ -15,7 +15,6 @@ #include "FileRequest.h" #include "FileService.h" #include "nsIRequest.h" -#include "nsThreadUtils.h" USING_FILE_NAMESPACE @@ -210,17 +209,3 @@ FileHelper::Finish() mRequest), "Subclass didn't call FileHelper::ReleaseObjects!"); } - -void -FileHelper::OnStreamClose() -{ - NS_ASSERTION(NS_IsMainThread(), "Wrong thread!"); - Finish(); -} - -void -FileHelper::OnStreamDestroy() -{ - NS_ASSERTION(NS_IsMainThread(), "Wrong thread!"); - Finish(); -} diff --git a/dom/file/FileHelper.h b/dom/file/FileHelper.h index 90c05e209b8a..b82865f67424 100644 --- a/dom/file/FileHelper.h +++ b/dom/file/FileHelper.h @@ -10,6 +10,7 @@ #include "FileCommon.h" #include "nsIRequestObserver.h" +#include "nsThreadUtils.h" class nsIFileStorage; @@ -57,10 +58,18 @@ public: OnStreamProgress(uint64_t aProgress, uint64_t aProgressMax); void - OnStreamClose(); + OnStreamClose() + { + NS_ASSERTION(NS_IsMainThread(), "Wrong thread!"); + Finish(); + } void - OnStreamDestroy(); + OnStreamDestroy() + { + NS_ASSERTION(NS_IsMainThread(), "Wrong thread!"); + Finish(); + } static LockedFile* GetCurrentLockedFile(); diff --git a/dom/indexedDB/FileInfo.cpp b/dom/indexedDB/FileInfo.cpp index 5b1c748a95cf..f8f085eecb45 100644 --- a/dom/indexedDB/FileInfo.cpp +++ b/dom/indexedDB/FileInfo.cpp @@ -5,7 +5,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "FileInfo.h" -#include "nsThreadUtils.h" + #include "mozilla/dom/quota/QuotaManager.h" USING_INDEXEDDB_NAMESPACE diff --git a/dom/indexedDB/FileInfo.h b/dom/indexedDB/FileInfo.h index 51512e01ce22..e79e763260a7 100644 --- a/dom/indexedDB/FileInfo.h +++ b/dom/indexedDB/FileInfo.h @@ -9,6 +9,8 @@ #include "IndexedDatabase.h" +#include "nsThreadUtils.h" + #include "FileManager.h" #include "IndexedDatabaseManager.h" diff --git a/dom/plugins/ipc/PluginHangUIParent.cpp b/dom/plugins/ipc/PluginHangUIParent.cpp index a97ce333f8b6..bf479a4ba5da 100644 --- a/dom/plugins/ipc/PluginHangUIParent.cpp +++ b/dom/plugins/ipc/PluginHangUIParent.cpp @@ -18,7 +18,6 @@ #include "nsIWindowMediator.h" #include "nsIWinTaskbar.h" #include "nsServiceManagerUtils.h" -#include "nsThreadUtils.h" #include "WidgetUtils.h" diff --git a/dom/plugins/ipc/PluginMessageUtils.h b/dom/plugins/ipc/PluginMessageUtils.h index c2ae48cf61a5..23da0f233ed8 100644 --- a/dom/plugins/ipc/PluginMessageUtils.h +++ b/dom/plugins/ipc/PluginMessageUtils.h @@ -20,6 +20,7 @@ #include "nsAutoPtr.h" #include "nsStringGlue.h" #include "nsTArray.h" +#include "nsThreadUtils.h" #include "prlog.h" #include "nsHashKeys.h" #ifdef MOZ_CRASHREPORTER diff --git a/dom/quota/QuotaManager.h b/dom/quota/QuotaManager.h index a10e95267996..48ee59515e21 100644 --- a/dom/quota/QuotaManager.h +++ b/dom/quota/QuotaManager.h @@ -17,6 +17,7 @@ #include "nsClassHashtable.h" #include "nsRefPtrHashtable.h" +#include "nsThreadUtils.h" #include "ArrayCluster.h" #include "Client.h" @@ -32,7 +33,6 @@ class nsIThread; class nsITimer; class nsIURI; class nsPIDOMWindow; -class nsIRunnable; BEGIN_QUOTA_NAMESPACE diff --git a/dom/src/notification/DesktopNotification.h b/dom/src/notification/DesktopNotification.h index e35f7f4fddca..90a026a888ed 100644 --- a/dom/src/notification/DesktopNotification.h +++ b/dom/src/notification/DesktopNotification.h @@ -15,6 +15,7 @@ #include "nsCycleCollectionParticipant.h" #include "nsIDOMWindow.h" #include "nsIScriptObjectPrincipal.h" +#include "nsThreadUtils.h" #include "nsDOMEventTargetHelper.h" #include "nsIDOMEvent.h" diff --git a/gfx/layers/ImageContainer.h b/gfx/layers/ImageContainer.h index 996ca4a8842c..e36bec1f8526 100644 --- a/gfx/layers/ImageContainer.h +++ b/gfx/layers/ImageContainer.h @@ -25,6 +25,7 @@ #include "nsRect.h" // for nsIntRect #include "nsSize.h" // for nsIntSize #include "nsTArray.h" // for nsTArray +#include "nsThreadUtils.h" // for NS_IsMainThread #include "mozilla/Atomics.h" class nsMainThreadSurfaceRef; @@ -816,6 +817,7 @@ public: virtual already_AddRefed GetAsSurface() { + NS_ASSERTION(NS_IsMainThread(), "Must be main thread"); nsRefPtr surface = mSurface.get(); return surface.forget(); } diff --git a/gfx/thebes/gfxFontUtils.h b/gfx/thebes/gfxFontUtils.h index 03b07745ff92..5a8f6b41780a 100644 --- a/gfx/thebes/gfxFontUtils.h +++ b/gfx/thebes/gfxFontUtils.h @@ -16,6 +16,8 @@ #include "nsITimer.h" #include "nsCOMPtr.h" +#include "nsIRunnable.h" +#include "nsThreadUtils.h" #include "nsComponentManagerUtils.h" #include "nsTArray.h" #include "nsAutoPtr.h" diff --git a/media/mtransport/transportflow.h b/media/mtransport/transportflow.h index a553050d6cf7..8add5eb1dff2 100644 --- a/media/mtransport/transportflow.h +++ b/media/mtransport/transportflow.h @@ -18,7 +18,6 @@ #include "mozilla/Scoped.h" #include "transportlayer.h" #include "m_cpp_utils.h" -#include "nsAutoPtr.h" // A stack of transport layers acts as a flow. // Generally, one reads and writes to the top layer. diff --git a/media/mtransport/transportlayer.cpp b/media/mtransport/transportlayer.cpp index a31ebef4077f..c851bae2388d 100644 --- a/media/mtransport/transportlayer.cpp +++ b/media/mtransport/transportlayer.cpp @@ -8,7 +8,6 @@ #include "logging.h" #include "transportflow.h" #include "transportlayer.h" -#include "nsThreadUtils.h" // Logging context namespace mozilla { @@ -47,19 +46,4 @@ void TransportLayer::SetState(State state) { } } -nsresult TransportLayer::RunOnThread(nsIRunnable *event) { - if (target_) { - nsIThread *thr; - - DebugOnly rv = NS_GetCurrentThread(&thr); - MOZ_ASSERT(NS_SUCCEEDED(rv)); - - if (target_ != thr) { - return target_->Dispatch(event, NS_DISPATCH_SYNC); - } - } - - return event->Run(); -} - } // close namespace diff --git a/media/mtransport/transportlayer.h b/media/mtransport/transportlayer.h index f018a8f44181..d523d62e0a2e 100644 --- a/media/mtransport/transportlayer.h +++ b/media/mtransport/transportlayer.h @@ -15,6 +15,7 @@ #include "mozilla/RefPtr.h" #include "nsCOMPtr.h" #include "nsIEventTarget.h" +#include "nsThreadUtils.h" #include "m_cpp_utils.h" @@ -61,7 +62,20 @@ class TransportLayer : public sigslot::has_slots<> { // Dispatch a call onto our thread (or run on the same thread if // thread is not set). This is always synchronous. - nsresult RunOnThread(nsIRunnable *event); + nsresult RunOnThread(nsIRunnable *event) { + if (target_) { + nsIThread *thr; + + DebugOnly rv = NS_GetCurrentThread(&thr); + MOZ_ASSERT(NS_SUCCEEDED(rv)); + + if (target_ != thr) { + return target_->Dispatch(event, NS_DISPATCH_SYNC); + } + } + + return event->Run(); + } // Get the state State state() const { return state_; } diff --git a/mobile/android/components/build/nsAndroidHistory.cpp b/mobile/android/components/build/nsAndroidHistory.cpp index 8bcc1dee65fe..ac0dc4ff8666 100644 --- a/mobile/android/components/build/nsAndroidHistory.cpp +++ b/mobile/android/components/build/nsAndroidHistory.cpp @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include "nsThreadUtils.h" #include "nsAndroidHistory.h" #include "AndroidBridge.h" #include "Link.h" diff --git a/mobile/android/components/build/nsAndroidHistory.h b/mobile/android/components/build/nsAndroidHistory.h index 7e8c03286ed2..2ec5d8577771 100644 --- a/mobile/android/components/build/nsAndroidHistory.h +++ b/mobile/android/components/build/nsAndroidHistory.h @@ -9,7 +9,7 @@ #include "IHistory.h" #include "nsDataHashtable.h" #include "nsTPriorityQueue.h" -#include "nsIRunnable.h" +#include "nsThreadUtils.h" #define NS_ANDROIDHISTORY_CID \ {0xCCAA4880, 0x44DD, 0x40A7, {0xA1, 0x3F, 0x61, 0x56, 0xFC, 0x88, 0x2C, 0x0B}} diff --git a/netwerk/base/src/Dashboard.cpp b/netwerk/base/src/Dashboard.cpp index 115c6a0c3a2a..c4232b071336 100644 --- a/netwerk/base/src/Dashboard.cpp +++ b/netwerk/base/src/Dashboard.cpp @@ -10,7 +10,6 @@ #include "nsIDNSService.h" #include "nsIThread.h" #include "nsSocketTransport2.h" -#include "nsThreadUtils.h" using mozilla::AutoSafeJSContext; namespace mozilla { diff --git a/netwerk/base/src/EventTokenBucket.cpp b/netwerk/base/src/EventTokenBucket.cpp index aa09670992aa..525dfc1582ab 100644 --- a/netwerk/base/src/EventTokenBucket.cpp +++ b/netwerk/base/src/EventTokenBucket.cpp @@ -8,7 +8,6 @@ #include "nsNetUtil.h" #include "nsSocketTransportService2.h" -#include "nsThreadUtils.h" #ifdef XP_WIN #include diff --git a/netwerk/base/src/Tickler.cpp b/netwerk/base/src/Tickler.cpp index 0b240fc4cafc..392d68eb50f7 100644 --- a/netwerk/base/src/Tickler.cpp +++ b/netwerk/base/src/Tickler.cpp @@ -9,7 +9,6 @@ #include "nsServiceManagerUtils.h" #include "prnetdb.h" #include "Tickler.h" -#include "nsThreadUtils.h" #ifdef MOZ_USE_WIFI_TICKLER diff --git a/netwerk/base/src/Tickler.h b/netwerk/base/src/Tickler.h index 75f42ae2441f..f8af5f934193 100644 --- a/netwerk/base/src/Tickler.h +++ b/netwerk/base/src/Tickler.h @@ -32,6 +32,7 @@ #include "nsAutoPtr.h" #include "nsISupports.h" #include "nsIThread.h" +#include "nsThreadUtils.h" #include "nsITimer.h" #include "nsWeakReference.h" diff --git a/netwerk/base/src/nsSocketTransport2.cpp b/netwerk/base/src/nsSocketTransport2.cpp index 5160f112d7b1..6c00641561be 100644 --- a/netwerk/base/src/nsSocketTransport2.cpp +++ b/netwerk/base/src/nsSocketTransport2.cpp @@ -26,7 +26,7 @@ #include "prerr.h" #include "NetworkActivityMonitor.h" #include "mozilla/VisualEventTracer.h" -#include "nsThreadUtils.h" + #include "nsIServiceManager.h" #include "nsISocketProviderService.h" #include "nsISocketProvider.h" diff --git a/netwerk/base/src/nsSocketTransportService2.cpp b/netwerk/base/src/nsSocketTransportService2.cpp index ae5908571518..4caa6aa1c247 100644 --- a/netwerk/base/src/nsSocketTransportService2.cpp +++ b/netwerk/base/src/nsSocketTransportService2.cpp @@ -24,7 +24,6 @@ #include "mozilla/Preferences.h" #include "mozilla/Likely.h" #include "mozilla/PublicSSL.h" -#include "nsThreadUtils.h" using namespace mozilla; using namespace mozilla::net; diff --git a/netwerk/base/src/nsSocketTransportService2.h b/netwerk/base/src/nsSocketTransportService2.h index 5150a2e3f6e6..4797ab73babf 100644 --- a/netwerk/base/src/nsSocketTransportService2.h +++ b/netwerk/base/src/nsSocketTransportService2.h @@ -8,7 +8,7 @@ #include "nsPISocketTransportService.h" #include "nsIThreadInternal.h" -#include "nsIRunnable.h" +#include "nsThreadUtils.h" #include "nsEventQueue.h" #include "nsCOMPtr.h" #include "pldhash.h" diff --git a/netwerk/base/src/nsUDPServerSocket.h b/netwerk/base/src/nsUDPServerSocket.h index 1f65ad152a91..183ac7f9f939 100644 --- a/netwerk/base/src/nsUDPServerSocket.h +++ b/netwerk/base/src/nsUDPServerSocket.h @@ -10,7 +10,6 @@ #include "nsSocketTransportService2.h" #include "mozilla/Mutex.h" #include "nsIOutputStream.h" -#include "nsAutoPtr.h" //----------------------------------------------------------------------------- diff --git a/netwerk/ipc/ChannelEventQueue.cpp b/netwerk/ipc/ChannelEventQueue.cpp index eac17c182109..49682a81c372 100644 --- a/netwerk/ipc/ChannelEventQueue.cpp +++ b/netwerk/ipc/ChannelEventQueue.cpp @@ -7,7 +7,6 @@ #include "nsISupports.h" #include "mozilla/net/ChannelEventQueue.h" -#include "nsThreadUtils.h" namespace mozilla { namespace net { @@ -42,21 +41,6 @@ ChannelEventQueue::FlushQueue() mFlushing = false; } -void -ChannelEventQueue::Resume() -{ - // Resuming w/o suspend: error in debug mode, ignore in build - MOZ_ASSERT(mSuspendCount > 0); - if (mSuspendCount <= 0) { - return; - } - - if (!--mSuspendCount) { - nsRefPtr > event = - NS_NewRunnableMethod(this, &ChannelEventQueue::CompleteResume); - NS_DispatchToCurrentThread(event); - } -} } } diff --git a/netwerk/ipc/ChannelEventQueue.h b/netwerk/ipc/ChannelEventQueue.h index 87c58afe44b9..0350514d1cd0 100644 --- a/netwerk/ipc/ChannelEventQueue.h +++ b/netwerk/ipc/ChannelEventQueue.h @@ -10,6 +10,7 @@ #include #include +#include class nsISupports; @@ -69,7 +70,7 @@ class ChannelEventQueue inline void Suspend(); // Resume flushes the queue asynchronously, i.e. items in queue will be // dispatched in a new event on the current thread. - void Resume(); + inline void Resume(); private: inline void MaybeFlushQueue(); @@ -139,6 +140,22 @@ ChannelEventQueue::CompleteResume() } } +inline void +ChannelEventQueue::Resume() +{ + // Resuming w/o suspend: error in debug mode, ignore in build + MOZ_ASSERT(mSuspendCount > 0); + if (mSuspendCount <= 0) { + return; + } + + if (!--mSuspendCount) { + nsRefPtr > event = + NS_NewRunnableMethod(this, &ChannelEventQueue::CompleteResume); + NS_DispatchToCurrentThread(event); + } +} + inline void ChannelEventQueue::MaybeFlushQueue() { diff --git a/netwerk/protocol/http/nsHttpChannel.h b/netwerk/protocol/http/nsHttpChannel.h index 88e25ef7c097..3ce92220126f 100644 --- a/netwerk/protocol/http/nsHttpChannel.h +++ b/netwerk/protocol/http/nsHttpChannel.h @@ -11,6 +11,7 @@ #include "nsHttpTransaction.h" #include "nsInputStreamPump.h" +#include "nsThreadUtils.h" #include "nsTArray.h" #include "nsIHttpEventSink.h" diff --git a/parser/html/nsHtml5Parser.h b/parser/html/nsHtml5Parser.h index bce099e75152..a46448e33ca3 100644 --- a/parser/html/nsHtml5Parser.h +++ b/parser/html/nsHtml5Parser.h @@ -12,6 +12,7 @@ #include "nsIURL.h" #include "nsParserCIID.h" #include "nsITokenizer.h" +#include "nsThreadUtils.h" #include "nsIContentSink.h" #include "nsIRequest.h" #include "nsIChannel.h" diff --git a/storage/src/mozStorageAsyncStatementExecution.h b/storage/src/mozStorageAsyncStatementExecution.h index 19ab6bf8b19b..4553339826a0 100644 --- a/storage/src/mozStorageAsyncStatementExecution.h +++ b/storage/src/mozStorageAsyncStatementExecution.h @@ -10,10 +10,10 @@ #include "nscore.h" #include "nsTArray.h" #include "nsAutoPtr.h" +#include "nsThreadUtils.h" #include "mozilla/Mutex.h" #include "mozilla/TimeStamp.h" #include "mozilla/Attributes.h" -#include "nsIRunnable.h" #include "SQLiteMutex.h" #include "mozIStoragePendingStatement.h" diff --git a/toolkit/components/places/nsNavHistory.h b/toolkit/components/places/nsNavHistory.h index 15754b2b04e3..29686651af8b 100644 --- a/toolkit/components/places/nsNavHistory.h +++ b/toolkit/components/places/nsNavHistory.h @@ -21,6 +21,7 @@ #include "nsCategoryCache.h" #include "nsNetCID.h" #include "nsToolkitCompsCID.h" +#include "nsThreadUtils.h" #include "nsURIHashKey.h" #include "nsTHashtable.h" diff --git a/widget/android/AndroidBridge.h b/widget/android/AndroidBridge.h index 343f1b22d8dd..c2a158056e03 100644 --- a/widget/android/AndroidBridge.h +++ b/widget/android/AndroidBridge.h @@ -13,6 +13,9 @@ #include "nsCOMPtr.h" #include "nsCOMArray.h" +#include "nsIRunnable.h" +#include "nsIObserver.h" +#include "nsThreadUtils.h" #include "AndroidJavaWrappers.h" @@ -35,7 +38,6 @@ class nsWindow; class nsIDOMMozSmsMessage; -class nsIObserver; /* See the comment in AndroidBridge about this function before using it */ extern "C" JNIEnv * GetJNIForThread(); diff --git a/widget/windows/JumpListBuilder.h b/widget/windows/JumpListBuilder.h index 2c32fb656492..d346b4a817e0 100644 --- a/widget/windows/JumpListBuilder.h +++ b/widget/windows/JumpListBuilder.h @@ -20,6 +20,7 @@ #include "nsIJumpListItem.h" #include "JumpListItem.h" #include "nsIObserver.h" +#include "nsThreadUtils.h" #include "mozilla/Attributes.h" namespace mozilla { diff --git a/widget/windows/WinUtils.cpp b/widget/windows/WinUtils.cpp index e86acb4854eb..8ff4bf3002d3 100644 --- a/widget/windows/WinUtils.cpp +++ b/widget/windows/WinUtils.cpp @@ -27,7 +27,6 @@ #include "nsIChannel.h" #include "nsIObserver.h" #include "imgIEncoder.h" -#include "nsIThread.h" #ifdef NS_ENABLE_TSF #include diff --git a/widget/windows/WinUtils.h b/widget/windows/WinUtils.h index 0e6ae2113d79..a71e6a7cdb54 100644 --- a/widget/windows/WinUtils.h +++ b/widget/windows/WinUtils.h @@ -15,7 +15,7 @@ #include "nsString.h" #include "nsRegion.h" -#include "nsIRunnable.h" +#include "nsThreadUtils.h" #include "nsICryptoHash.h" #ifdef MOZ_PLACES #include "nsIFaviconService.h" @@ -30,7 +30,6 @@ class nsWindow; class nsWindowBase; struct KeyPair; struct nsIntRect; -class nsIThread; namespace mozilla { namespace widget { diff --git a/widget/windows/nsSound.cpp b/widget/windows/nsSound.cpp index 0813412b73b2..a5ad2341390d 100644 --- a/widget/windows/nsSound.cpp +++ b/widget/windows/nsSound.cpp @@ -24,7 +24,6 @@ #include "prmem.h" #include "nsNativeCharsetUtils.h" -#include "nsThreadUtils.h" #ifdef PR_LOGGING PRLogModuleInfo* gWin32SoundLog = nullptr; diff --git a/widget/windows/nsSound.h b/widget/windows/nsSound.h index f8344c192e57..f423a6ec57e4 100644 --- a/widget/windows/nsSound.h +++ b/widget/windows/nsSound.h @@ -9,9 +9,7 @@ #include "nsISound.h" #include "nsIStreamLoader.h" -#include "nsCOMPtr.h" - -class nsIThread; +#include "nsThreadUtils.h" class nsSound : public nsISound, public nsIStreamLoaderObserver