Bug 913847 - Include MainThreadUtils.h instead of nsThreadUtils.h - r=ehsan

This commit is contained in:
Benoit Jacob 2013-09-19 09:54:42 -04:00
parent c5ae5da96d
commit eeccdc3ba1
19 changed files with 27 additions and 13 deletions

View File

@ -13,7 +13,7 @@
#include "nsIScriptGlobalObject.h"
#include "nsEventListenerManager.h"
#include "nsIScriptContext.h"
#include "nsThreadUtils.h"
#include "MainThreadUtils.h"
#include "mozilla/Attributes.h"
#include "mozilla/dom/EventTarget.h"

View File

@ -15,7 +15,9 @@
#include "TimeVarying.h"
#include "VideoFrameContainer.h"
#include "VideoSegment.h"
#include "nsThreadUtils.h"
#include "MainThreadUtils.h"
class nsIRunnable;
namespace mozilla {

View File

@ -23,7 +23,7 @@
#include "mozilla/Util.h"
#include "nsCycleCollector.h"
#include "nsIXPConnect.h"
#include "nsThreadUtils.h" // Hacky work around for some bindings needing NS_IsMainThread.
#include "MainThreadUtils.h"
#include "nsTraceRefcnt.h"
#include "qsObjectHelper.h"
#include "xpcpublic.h"

View File

@ -13,7 +13,7 @@
#include "mozilla/dom/IDBIndexBinding.h"
#include "mozilla/dom/IDBObjectStoreBinding.h"
#include "nsCycleCollectionParticipant.h"
#include "nsThreadUtils.h"
#include "MainThreadUtils.h"
#include "mozilla/dom/indexedDB/IDBRequest.h"
#include "mozilla/dom/indexedDB/IDBTransaction.h"

View File

@ -23,6 +23,7 @@
#include "nsContentUtils.h"
#include "nsPluginInstanceOwner.h"
#include "nsThreadUtils.h"
#include "nsIDOMElement.h"
#include "nsIDocument.h"
#include "nsIDocShell.h"

View File

@ -19,7 +19,7 @@
#include "nsWeakPtr.h"
#include "nsIPrompt.h"
#include "nsWeakReference.h"
#include "nsThreadUtils.h"
#include "MainThreadUtils.h"
#include "nsTArray.h"
#include "nsTObserverArray.h"
#include "nsITimer.h"

View File

@ -14,6 +14,7 @@
#include "nsXULAppAPI.h"
#include "mozilla/unused.h"
#include "nsProxyRelease.h"
#include "nsThreadUtils.h"
namespace mozilla {
namespace dom {

View File

@ -127,7 +127,7 @@
#include "nsXPIDLString.h"
#include "nsAutoJSValHolder.h"
#include "nsThreadUtils.h"
#include "MainThreadUtils.h"
#include "nsIJSEngineTelemetryStats.h"
#include "nsIConsoleService.h"

View File

@ -6,7 +6,9 @@
#define nsLayoutStatics_h__
#include "nscore.h"
#include "nsThreadUtils.h"
#include "MainThreadUtils.h"
#include "nsTraceRefcnt.h"
#include "nsDebug.h"
// This isn't really a class, it's a namespace for static methods.
// Documents and other objects can hold a reference to the layout static

View File

@ -12,6 +12,7 @@
#include "nsNetCID.h"
#include "prnetdb.h"
#include "prio.h"
#include "nsThreadUtils.h"
#include "mozilla/Attributes.h"
#include "mozilla/net/DNS.h"

View File

@ -20,6 +20,7 @@
#include "nsIPipe.h"
#include "prerror.h"
#include "nsINSSErrorsService.h"
#include "nsThreadUtils.h"
using namespace mozilla::net;
using namespace mozilla;

View File

@ -12,7 +12,7 @@
#include "nsAHttpConnection.h"
#include "EventTokenBucket.h"
#include "nsCOMPtr.h"
#include "nsThreadUtils.h"
#include "nsIPipe.h"
#include "nsIInputStream.h"
#include "nsILoadGroup.h"

View File

@ -14,6 +14,7 @@
#include "nsICacheSession.h"
#include "nsCharsetSource.h"
#include "nsProxyRelease.h"
#include "nsThreadUtils.h"
// Must release mChannel on the main thread
class nsWyciwygAsyncEvent : public nsRunnable {

View File

@ -17,6 +17,7 @@
#include "nsDirectoryServiceDefs.h"
#include "nsICertOverrideService.h"
#include "mozilla/Preferences.h"
#include "nsThreadUtils.h"
#ifndef MOZ_DISABLE_CRYPTOLEGACY
#include "nsIDOMNode.h"

View File

@ -13,7 +13,7 @@
#include "nsTArray.h"
#include "nsIEventTarget.h"
#include "mozilla/Util.h"
#include "nsThreadUtils.h"
#include "MainThreadUtils.h"
#include "mozStorageBindingParamsArray.h"
#include "mozIStorageBaseStatement.h"

View File

@ -11,6 +11,7 @@
#include "nsIChannelEventSink.h"
#include "nsIInterfaceRequestor.h"
#include "nsIStreamListener.h"
#include "nsThreadUtils.h"
#include "Database.h"
#include "mozilla/storage.h"

View File

@ -5,13 +5,14 @@
#ifndef mozilla_places_Database_h_
#define mozilla_places_Database_h_
#include "nsThreadUtils.h"
#include "MainThreadUtils.h"
#include "nsWeakReference.h"
#include "nsIInterfaceRequestorUtils.h"
#include "nsIObserver.h"
#include "mozilla/storage.h"
#include "mozilla/storage/StatementCache.h"
#include "mozilla/Attributes.h"
#include "nsIEventTarget.h"
// This is the schema version. Update it at any schema change and add a
// corresponding migrateVxx method below.
@ -43,6 +44,7 @@
#define TOPIC_PLACES_CONNECTION_CLOSED "places-connection-closed"
class nsIStringBundle;
class nsIRunnable;
namespace mozilla {
namespace places {

View File

@ -9,7 +9,7 @@
#include "mozilla/LinkedList.h"
#include "mozilla/StaticPtr.h"
#include "nsThreadUtils.h"
#include "MainThreadUtils.h"
/*
* This header exports one public method in the mozilla namespace:

View File

@ -9,7 +9,7 @@
#include "nsIEventTarget.h"
#include "nsCOMPtr.h"
#include "nsAutoPtr.h"
#include "nsThreadUtils.h"
#include "MainThreadUtils.h"
#include "mozilla/Likely.h"
#ifdef XPCOM_GLUE_AVOID_NSPR
@ -122,7 +122,8 @@ public:
if (NS_IsMainThread()) {
NS_IF_RELEASE(mRawPtr);
} else if (mRawPtr) {
nsCOMPtr<nsIThread> mainThread = do_GetMainThread();
nsCOMPtr<nsIThread> mainThread;
NS_GetMainThread(getter_AddRefs(mainThread));
if (!mainThread) {
NS_WARNING("Couldn't get main thread! Leaking pointer.");
return;