From 126b4f108e0d5f2db97b9aa6574272c0b2ef8876 Mon Sep 17 00:00:00 2001 From: Wes Kocher Date: Mon, 8 Dec 2014 16:27:12 -0800 Subject: [PATCH] Backed out changeset bf25101e66cf (bug 1095098) for build bustage --- accessible/xpcom/xpcAccessibleTextRange.cpp | 1 - accessible/xul/XULTreeAccessible.cpp | 1 - accessible/xul/XULTreeGridAccessible.cpp | 1 - chrome/nsChromeRegistry.cpp | 1 - docshell/base/nsDSURIContentListener.cpp | 1 - docshell/base/nsDocShell.cpp | 1 - dom/base/nsDOMWindowUtils.cpp | 1 - dom/base/nsDocument.cpp | 1 - dom/base/nsFrameMessageManager.cpp | 1 - dom/base/nsGlobalWindow.cpp | 1 - dom/base/nsObjectLoadingContent.cpp | 1 - dom/base/nsStyleLinkElement.cpp | 1 - dom/base/nsTreeSanitizer.cpp | 1 - dom/bluetooth/BluetoothRilListener.cpp | 1 - dom/bluetooth2/BluetoothRilListener.cpp | 1 - dom/filehandle/FileStreamWrappers.cpp | 1 - dom/html/HTMLFieldSetElement.cpp | 1 - dom/html/HTMLFormElement.cpp | 1 - dom/html/HTMLLabelElement.cpp | 1 - dom/html/HTMLMediaElement.cpp | 1 - dom/html/nsGenericHTMLElement.cpp | 1 - dom/indexedDB/IDBDatabase.cpp | 1 - dom/media/MediaDevices.cpp | 1 - dom/media/MediaPermissionGonk.cpp | 1 - .../recognition/SpeechRecognition.cpp | 1 - dom/svg/DOMSVGStringList.cpp | 1 - dom/svg/nsSVGElement.cpp | 1 - dom/workers/ServiceWorkerManager.cpp | 1 - dom/workers/WorkerPrivate.cpp | 1 - dom/xbl/nsXBLPrototypeHandler.cpp | 1 - dom/xul/nsXULElement.cpp | 1 - editor/libeditor/IMETextTxn.cpp | 1 - editor/libeditor/InsertTextTxn.cpp | 1 - editor/libeditor/PlaceholderTxn.cpp | 1 - editor/libeditor/nsEditorEventListener.cpp | 1 - .../libeditor/nsHTMLEditorEventListener.cpp | 1 - layout/base/nsPresShell.cpp | 1 - layout/inspector/inDOMUtils.cpp | 1 - layout/style/CSSStyleSheet.cpp | 1 - layout/style/nsDOMCSSDeclaration.cpp | 1 - layout/style/nsRuleWalker.h | 1 - layout/style/nsStyleSet.cpp | 1 - .../src/peerconnection/PeerConnectionImpl.cpp | 1 - netwerk/protocol/http/HttpChannelParent.cpp | 2 +- netwerk/protocol/http/nsHttpChannel.cpp | 1 - profile/dirserviceprovider/nsProfileLock.cpp | 1 - .../components/places/nsNavHistoryResult.cpp | 1 - uriloader/base/nsDocLoader.cpp | 1 - widget/cocoa/nsDeviceContextSpecX.mm | 1 - widget/cocoa/nsMenuUtilsX.mm | 1 - widget/cocoa/nsPrintDialogX.mm | 1 - widget/cocoa/nsPrintOptionsX.mm | 1 - widget/windows/LSPAnnotator.cpp | 1 - xpcom/base/moz.build | 1 - xpcom/base/nsAutoPtr.h | 91 +++++++++++++++ xpcom/base/nsQueryObject.h | 107 ------------------ xpcom/tests/TestNsRefPtr.cpp | 1 - xpfe/appshell/nsXULWindow.cpp | 1 - 58 files changed, 92 insertions(+), 163 deletions(-) delete mode 100644 xpcom/base/nsQueryObject.h diff --git a/accessible/xpcom/xpcAccessibleTextRange.cpp b/accessible/xpcom/xpcAccessibleTextRange.cpp index b551542d31b1..0ca9ebf8bf0a 100644 --- a/accessible/xpcom/xpcAccessibleTextRange.cpp +++ b/accessible/xpcom/xpcAccessibleTextRange.cpp @@ -11,7 +11,6 @@ #include "nsIMutableArray.h" #include "nsComponentManagerUtils.h" -#include "nsQueryObject.h" using namespace mozilla; using namespace mozilla::a11y; diff --git a/accessible/xul/XULTreeAccessible.cpp b/accessible/xul/XULTreeAccessible.cpp index 03b2223a6745..eea941241f55 100644 --- a/accessible/xul/XULTreeAccessible.cpp +++ b/accessible/xul/XULTreeAccessible.cpp @@ -17,7 +17,6 @@ #include "Role.h" #include "States.h" #include "XULTreeGridAccessible.h" -#include "nsQueryObject.h" #include "nsComponentManagerUtils.h" #include "nsIAccessibleRelation.h" diff --git a/accessible/xul/XULTreeGridAccessible.cpp b/accessible/xul/XULTreeGridAccessible.cpp index 8a303ef58626..ddeec5d442d8 100644 --- a/accessible/xul/XULTreeGridAccessible.cpp +++ b/accessible/xul/XULTreeGridAccessible.cpp @@ -13,7 +13,6 @@ #include "Relation.h" #include "Role.h" #include "States.h" -#include "nsQueryObject.h" #include "nsIBoxObject.h" #include "nsIMutableArray.h" diff --git a/chrome/nsChromeRegistry.cpp b/chrome/nsChromeRegistry.cpp index 5c375742b16a..fa96f22c4c12 100644 --- a/chrome/nsChromeRegistry.cpp +++ b/chrome/nsChromeRegistry.cpp @@ -15,7 +15,6 @@ #include "nsEscape.h" #include "nsNetUtil.h" #include "nsString.h" -#include "nsQueryObject.h" #include "mozilla/CSSStyleSheet.h" #include "mozilla/dom/URL.h" diff --git a/docshell/base/nsDSURIContentListener.cpp b/docshell/base/nsDSURIContentListener.cpp index 5ec1c7b66df9..5e6b1e826588 100644 --- a/docshell/base/nsDSURIContentListener.cpp +++ b/docshell/base/nsDSURIContentListener.cpp @@ -13,7 +13,6 @@ #include "nsIDOMWindow.h" #include "nsNetUtil.h" #include "nsAutoPtr.h" -#include "nsQueryObject.h" #include "nsIHttpChannel.h" #include "nsIScriptSecurityManager.h" #include "nsError.h" diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp index 1c9081a4cae9..6b6fc0b5c9fe 100644 --- a/docshell/base/nsDocShell.cpp +++ b/docshell/base/nsDocShell.cpp @@ -57,7 +57,6 @@ #include "nsContentPolicyUtils.h" // NS_CheckContentLoadPolicy(...) #include "nsISeekableStream.h" #include "nsAutoPtr.h" -#include "nsQueryObject.h" #include "nsIWritablePropertyBag2.h" #include "nsIAppShell.h" #include "nsWidgetsCID.h" diff --git a/dom/base/nsDOMWindowUtils.cpp b/dom/base/nsDOMWindowUtils.cpp index fe8be2f536ee..8370838006c8 100644 --- a/dom/base/nsDOMWindowUtils.cpp +++ b/dom/base/nsDOMWindowUtils.cpp @@ -24,7 +24,6 @@ #include "nsFrame.h" #include "mozilla/layers/ShadowLayers.h" #include "ClientLayerManager.h" -#include "nsQueryObject.h" #include "nsIScrollableFrame.h" diff --git a/dom/base/nsDocument.cpp b/dom/base/nsDocument.cpp index a8214454b7fc..b7e6cc95fb0a 100644 --- a/dom/base/nsDocument.cpp +++ b/dom/base/nsDocument.cpp @@ -224,7 +224,6 @@ #include "nsLocation.h" #include "mozilla/dom/FontFaceSet.h" #include "mozilla/dom/BoxObject.h" -#include "nsQueryObject.h" #ifdef MOZ_MEDIA_NAVIGATOR #include "mozilla/MediaManager.h" diff --git a/dom/base/nsFrameMessageManager.cpp b/dom/base/nsFrameMessageManager.cpp index a3929b7b2d8c..eac1f9c76eac 100644 --- a/dom/base/nsFrameMessageManager.cpp +++ b/dom/base/nsFrameMessageManager.cpp @@ -42,7 +42,6 @@ #include "mozilla/dom/DOMStringList.h" #include "nsPrintfCString.h" #include "nsXULAppAPI.h" -#include "nsQueryObject.h" #include #ifdef ANDROID diff --git a/dom/base/nsGlobalWindow.cpp b/dom/base/nsGlobalWindow.cpp index 3939adcc7809..fd91cde7504b 100644 --- a/dom/base/nsGlobalWindow.cpp +++ b/dom/base/nsGlobalWindow.cpp @@ -119,7 +119,6 @@ #include "nsIControllerContext.h" #include "nsGlobalWindowCommands.h" #include "nsAutoPtr.h" -#include "nsQueryObject.h" #include "nsContentUtils.h" #include "nsCSSProps.h" #include "nsIDOMFileList.h" diff --git a/dom/base/nsObjectLoadingContent.cpp b/dom/base/nsObjectLoadingContent.cpp index 74ed84c7a8c8..a1c4068aa922 100644 --- a/dom/base/nsObjectLoadingContent.cpp +++ b/dom/base/nsObjectLoadingContent.cpp @@ -58,7 +58,6 @@ #include "nsUnicharUtils.h" #include "mozilla/Preferences.h" #include "nsSandboxFlags.h" -#include "nsQueryObject.h" // Concrete classes #include "nsFrameLoader.h" diff --git a/dom/base/nsStyleLinkElement.cpp b/dom/base/nsStyleLinkElement.cpp index 366bf2fa5c5f..0cb699bd1f46 100644 --- a/dom/base/nsStyleLinkElement.cpp +++ b/dom/base/nsStyleLinkElement.cpp @@ -30,7 +30,6 @@ #include "nsUnicharInputStream.h" #include "nsContentUtils.h" #include "nsStyleUtil.h" -#include "nsQueryObject.h" using namespace mozilla; using namespace mozilla::dom; diff --git a/dom/base/nsTreeSanitizer.cpp b/dom/base/nsTreeSanitizer.cpp index 5a2a4dcd511c..ede76e9f654c 100644 --- a/dom/base/nsTreeSanitizer.cpp +++ b/dom/base/nsTreeSanitizer.cpp @@ -23,7 +23,6 @@ #include "nsContentUtils.h" #include "nsIParserUtils.h" #include "nsIDocument.h" -#include "nsQueryObject.h" using namespace mozilla; diff --git a/dom/bluetooth/BluetoothRilListener.cpp b/dom/bluetooth/BluetoothRilListener.cpp index ad85f7dafed8..650d3c533e65 100644 --- a/dom/bluetooth/BluetoothRilListener.cpp +++ b/dom/bluetooth/BluetoothRilListener.cpp @@ -14,7 +14,6 @@ #include "nsRadioInterfaceLayer.h" // For NS_RILCONTENTHELPER_CONTRACTID. #include "nsServiceManagerUtils.h" #include "nsString.h" -#include "nsQueryObject.h" USING_BLUETOOTH_NAMESPACE diff --git a/dom/bluetooth2/BluetoothRilListener.cpp b/dom/bluetooth2/BluetoothRilListener.cpp index ad85f7dafed8..650d3c533e65 100644 --- a/dom/bluetooth2/BluetoothRilListener.cpp +++ b/dom/bluetooth2/BluetoothRilListener.cpp @@ -14,7 +14,6 @@ #include "nsRadioInterfaceLayer.h" // For NS_RILCONTENTHELPER_CONTRACTID. #include "nsServiceManagerUtils.h" #include "nsString.h" -#include "nsQueryObject.h" USING_BLUETOOTH_NAMESPACE diff --git a/dom/filehandle/FileStreamWrappers.cpp b/dom/filehandle/FileStreamWrappers.cpp index a2d3637a7e0f..688c315416ec 100644 --- a/dom/filehandle/FileStreamWrappers.cpp +++ b/dom/filehandle/FileStreamWrappers.cpp @@ -17,7 +17,6 @@ #include "nsIRunnable.h" #include "nsISeekableStream.h" #include "nsThreadUtils.h" -#include "nsQueryObject.h" #ifdef DEBUG #include "nsXULAppAPI.h" diff --git a/dom/html/HTMLFieldSetElement.cpp b/dom/html/HTMLFieldSetElement.cpp index 8bbbf650a488..91ca69c56b54 100644 --- a/dom/html/HTMLFieldSetElement.cpp +++ b/dom/html/HTMLFieldSetElement.cpp @@ -9,7 +9,6 @@ #include "mozilla/dom/HTMLFieldSetElement.h" #include "mozilla/dom/HTMLFieldSetElementBinding.h" #include "nsContentList.h" -#include "nsQueryObject.h" NS_IMPL_NS_NEW_HTML_ELEMENT(FieldSet) diff --git a/dom/html/HTMLFormElement.cpp b/dom/html/HTMLFormElement.cpp index 82da6282ab18..8c9fbd33631e 100644 --- a/dom/html/HTMLFormElement.cpp +++ b/dom/html/HTMLFormElement.cpp @@ -31,7 +31,6 @@ #include "nsIMutableArray.h" #include "nsIFormAutofillContentService.h" #include "mozilla/BinarySearch.h" -#include "nsQueryObject.h" // form submission #include "nsIFormSubmitObserver.h" diff --git a/dom/html/HTMLLabelElement.cpp b/dom/html/HTMLLabelElement.cpp index dc47ca6ec05d..0509dfe12579 100644 --- a/dom/html/HTMLLabelElement.cpp +++ b/dom/html/HTMLLabelElement.cpp @@ -12,7 +12,6 @@ #include "mozilla/dom/HTMLLabelElementBinding.h" #include "nsFocusManager.h" #include "nsIDOMMouseEvent.h" -#include "nsQueryObject.h" // construction, destruction diff --git a/dom/html/HTMLMediaElement.cpp b/dom/html/HTMLMediaElement.cpp index 7dd50b259f1a..d34a28be9c74 100644 --- a/dom/html/HTMLMediaElement.cpp +++ b/dom/html/HTMLMediaElement.cpp @@ -38,7 +38,6 @@ #include "nsIThreadInternal.h" #include "nsContentUtils.h" #include "nsIRequest.h" -#include "nsQueryObject.h" #include "nsIScriptSecurityManager.h" #include "nsIXPConnect.h" diff --git a/dom/html/nsGenericHTMLElement.cpp b/dom/html/nsGenericHTMLElement.cpp index 58dd1ed8f486..0d5cf78873d3 100644 --- a/dom/html/nsGenericHTMLElement.cpp +++ b/dom/html/nsGenericHTMLElement.cpp @@ -17,7 +17,6 @@ #include "nsAttrValueInlines.h" #include "nsCOMPtr.h" #include "nsIAtom.h" -#include "nsQueryObject.h" #include "nsIContentInlines.h" #include "nsIContentViewer.h" #include "mozilla/css/StyleRule.h" diff --git a/dom/indexedDB/IDBDatabase.cpp b/dom/indexedDB/IDBDatabase.cpp index a92de664d2eb..ed7647642c78 100644 --- a/dom/indexedDB/IDBDatabase.cpp +++ b/dom/indexedDB/IDBDatabase.cpp @@ -49,7 +49,6 @@ #include "nsThreadUtils.h" #include "ProfilerHelpers.h" #include "ReportInternalError.h" -#include "nsQueryObject.h" // Include this last to avoid path problems on Windows. #include "ActorsChild.h" diff --git a/dom/media/MediaDevices.cpp b/dom/media/MediaDevices.cpp index d965509820db..d9545bf698df 100644 --- a/dom/media/MediaDevices.cpp +++ b/dom/media/MediaDevices.cpp @@ -10,7 +10,6 @@ #include "nsIEventTarget.h" #include "nsIScriptGlobalObject.h" #include "nsPIDOMWindow.h" -#include "nsQueryObject.h" namespace mozilla { namespace dom { diff --git a/dom/media/MediaPermissionGonk.cpp b/dom/media/MediaPermissionGonk.cpp index 31f7b00d0686..dbd08d2d8c77 100644 --- a/dom/media/MediaPermissionGonk.cpp +++ b/dom/media/MediaPermissionGonk.cpp @@ -12,7 +12,6 @@ #include "nsIStringEnumerator.h" #include "nsISupportsArray.h" #include "nsJSUtils.h" -#include "nsQueryObject.h" #include "nsPIDOMWindow.h" #include "nsTArray.h" #include "GetUserMediaRequest.h" diff --git a/dom/media/webspeech/recognition/SpeechRecognition.cpp b/dom/media/webspeech/recognition/SpeechRecognition.cpp index ee34e2d09f4e..dcde7e078794 100644 --- a/dom/media/webspeech/recognition/SpeechRecognition.cpp +++ b/dom/media/webspeech/recognition/SpeechRecognition.cpp @@ -21,7 +21,6 @@ #include "mozilla/dom/SpeechRecognitionEvent.h" #include "nsIObserverService.h" #include "nsServiceManagerUtils.h" -#include "nsQueryObject.h" #include diff --git a/dom/svg/DOMSVGStringList.cpp b/dom/svg/DOMSVGStringList.cpp index 6e534669fcf7..4f2241048a16 100644 --- a/dom/svg/DOMSVGStringList.cpp +++ b/dom/svg/DOMSVGStringList.cpp @@ -10,7 +10,6 @@ #include "nsError.h" #include "nsCOMPtr.h" #include "nsSVGAttrTearoffTable.h" -#include "nsQueryObject.h" #include // See the architecture comment in this file's header. diff --git a/dom/svg/nsSVGElement.cpp b/dom/svg/nsSVGElement.cpp index ff71f32b1a7a..df0e5be5c0d1 100644 --- a/dom/svg/nsSVGElement.cpp +++ b/dom/svg/nsSVGElement.cpp @@ -53,7 +53,6 @@ #include "mozilla/dom/SVGElementBinding.h" #include "mozilla/unused.h" #include "RestyleManager.h" -#include "nsQueryObject.h" using namespace mozilla; using namespace mozilla::dom; diff --git a/dom/workers/ServiceWorkerManager.cpp b/dom/workers/ServiceWorkerManager.cpp index 85bcd16af75a..06189d021523 100644 --- a/dom/workers/ServiceWorkerManager.cpp +++ b/dom/workers/ServiceWorkerManager.cpp @@ -21,7 +21,6 @@ #include "nsNetUtil.h" #include "nsProxyRelease.h" #include "nsTArray.h" -#include "nsQueryObject.h" #include "RuntimeService.h" #include "ServiceWorker.h" diff --git a/dom/workers/WorkerPrivate.cpp b/dom/workers/WorkerPrivate.cpp index c57504aa831a..2f6b80a137fc 100644 --- a/dom/workers/WorkerPrivate.cpp +++ b/dom/workers/WorkerPrivate.cpp @@ -29,7 +29,6 @@ #include "nsIURL.h" #include "nsIWorkerDebugger.h" #include "nsIXPConnect.h" -#include "nsQueryObject.h" #include #include "jsfriendapi.h" diff --git a/dom/xbl/nsXBLPrototypeHandler.cpp b/dom/xbl/nsXBLPrototypeHandler.cpp index e10edbfaf707..5b40111a4105 100644 --- a/dom/xbl/nsXBLPrototypeHandler.cpp +++ b/dom/xbl/nsXBLPrototypeHandler.cpp @@ -6,7 +6,6 @@ #include "mozilla/ArrayUtils.h" #include "nsCOMPtr.h" -#include "nsQueryObject.h" #include "nsXBLPrototypeHandler.h" #include "nsXBLPrototypeBinding.h" #include "nsContentUtils.h" diff --git a/dom/xul/nsXULElement.cpp b/dom/xul/nsXULElement.cpp index 2bb1f064a85d..6e73570451c3 100644 --- a/dom/xul/nsXULElement.cpp +++ b/dom/xul/nsXULElement.cpp @@ -93,7 +93,6 @@ #include "nsAttrValueInlines.h" #include "mozilla/Attributes.h" #include "nsIController.h" -#include "nsQueryObject.h" #include // The XUL doc interface diff --git a/editor/libeditor/IMETextTxn.cpp b/editor/libeditor/IMETextTxn.cpp index cb1b99b42e68..973573aec2db 100644 --- a/editor/libeditor/IMETextTxn.cpp +++ b/editor/libeditor/IMETextTxn.cpp @@ -13,7 +13,6 @@ #include "nsError.h" // for NS_SUCCEEDED, NS_FAILED, etc #include "nsIPresShell.h" // nsISelectionController constants #include "nsRange.h" // local var -#include "nsQueryObject.h" // for do_QueryObject using namespace mozilla; using namespace mozilla::dom; diff --git a/editor/libeditor/InsertTextTxn.cpp b/editor/libeditor/InsertTextTxn.cpp index 4c5e95f50968..4c896e2738b1 100644 --- a/editor/libeditor/InsertTextTxn.cpp +++ b/editor/libeditor/InsertTextTxn.cpp @@ -11,7 +11,6 @@ #include "nsDebug.h" // for NS_ASSERTION, etc #include "nsEditor.h" // mEditor #include "nsError.h" // for NS_OK, etc -#include "nsQueryObject.h" // for do_QueryObject using namespace mozilla; using namespace mozilla::dom; diff --git a/editor/libeditor/PlaceholderTxn.cpp b/editor/libeditor/PlaceholderTxn.cpp index 811ba8e5330f..80867fd37a72 100644 --- a/editor/libeditor/PlaceholderTxn.cpp +++ b/editor/libeditor/PlaceholderTxn.cpp @@ -8,7 +8,6 @@ #include "IMETextTxn.h" #include "nsGkAtoms.h" #include "mozilla/dom/Selection.h" -#include "nsQueryObject.h" using namespace mozilla; using namespace mozilla::dom; diff --git a/editor/libeditor/nsEditorEventListener.cpp b/editor/libeditor/nsEditorEventListener.cpp index 9c5139a952b7..b5af28458732 100644 --- a/editor/libeditor/nsEditorEventListener.cpp +++ b/editor/libeditor/nsEditorEventListener.cpp @@ -53,7 +53,6 @@ #include "nsRange.h" #include "nsServiceManagerUtils.h" // for do_GetService #include "nsString.h" // for nsAutoString -#include "nsQueryObject.h" // for do_QueryObject #ifdef HANDLE_NATIVE_TEXT_DIRECTION_SWITCH #include "nsContentUtils.h" // for nsContentUtils, etc #include "nsIBidiKeyboard.h" // for nsIBidiKeyboard diff --git a/editor/libeditor/nsHTMLEditorEventListener.cpp b/editor/libeditor/nsHTMLEditorEventListener.cpp index 61b207b50c7e..53477df64267 100644 --- a/editor/libeditor/nsHTMLEditorEventListener.cpp +++ b/editor/libeditor/nsHTMLEditorEventListener.cpp @@ -11,7 +11,6 @@ #include "nsDebug.h" #include "nsEditor.h" #include "nsError.h" -#include "nsQueryObject.h" #include "nsHTMLEditUtils.h" #include "nsHTMLEditor.h" #include "nsIDOMElement.h" diff --git a/layout/base/nsPresShell.cpp b/layout/base/nsPresShell.cpp index 7f157b21c94b..521372350e57 100644 --- a/layout/base/nsPresShell.cpp +++ b/layout/base/nsPresShell.cpp @@ -176,7 +176,6 @@ #include "nsIFrameInlines.h" #include "mozilla/gfx/2D.h" #include "nsSubDocumentFrame.h" -#include "nsQueryObject.h" #ifdef ANDROID #include "nsIDocShellTreeOwner.h" diff --git a/layout/inspector/inDOMUtils.cpp b/layout/inspector/inDOMUtils.cpp index 84ac3c919092..687b071760b2 100644 --- a/layout/inspector/inDOMUtils.cpp +++ b/layout/inspector/inDOMUtils.cpp @@ -45,7 +45,6 @@ #include "nsColor.h" #include "nsStyleSet.h" #include "nsStyleUtil.h" -#include "nsQueryObject.h" using namespace mozilla; using namespace mozilla::css; diff --git a/layout/style/CSSStyleSheet.cpp b/layout/style/CSSStyleSheet.cpp index eaee38957672..d25e0d6e8b35 100644 --- a/layout/style/CSSStyleSheet.cpp +++ b/layout/style/CSSStyleSheet.cpp @@ -43,7 +43,6 @@ #include "mozilla/Likely.h" #include "mozilla/dom/CSSStyleSheetBinding.h" #include "nsComponentManagerUtils.h" -#include "nsQueryObject.h" using namespace mozilla; using namespace mozilla::dom; diff --git a/layout/style/nsDOMCSSDeclaration.cpp b/layout/style/nsDOMCSSDeclaration.cpp index 7cfa1e2ca083..2365a71f6b10 100644 --- a/layout/style/nsDOMCSSDeclaration.cpp +++ b/layout/style/nsDOMCSSDeclaration.cpp @@ -18,7 +18,6 @@ #include "nsIURI.h" #include "mozilla/dom/BindingUtils.h" #include "nsContentUtils.h" -#include "nsQueryObject.h" using namespace mozilla; diff --git a/layout/style/nsRuleWalker.h b/layout/style/nsRuleWalker.h index b2715bf6f2b9..f77ee89161e3 100644 --- a/layout/style/nsRuleWalker.h +++ b/layout/style/nsRuleWalker.h @@ -14,7 +14,6 @@ #include "nsRuleNode.h" #include "nsIStyleRule.h" #include "StyleRule.h" -#include "nsQueryObject.h" class nsRuleWalker { public: diff --git a/layout/style/nsStyleSet.cpp b/layout/style/nsStyleSet.cpp index 8649c9859451..bb9f219f5776 100644 --- a/layout/style/nsStyleSet.cpp +++ b/layout/style/nsStyleSet.cpp @@ -38,7 +38,6 @@ #include "nsPrintfCString.h" #include "nsIFrame.h" #include "RestyleManager.h" -#include "nsQueryObject.h" using namespace mozilla; using namespace mozilla::dom; diff --git a/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp b/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp index 3e1d00ce76d2..dbc90cc305a9 100644 --- a/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp +++ b/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp @@ -17,7 +17,6 @@ #include "nspr.h" #include "nss.h" #include "pk11pub.h" -#include "nsQueryObject.h" #include "nsNetCID.h" #include "nsIProperty.h" diff --git a/netwerk/protocol/http/HttpChannelParent.cpp b/netwerk/protocol/http/HttpChannelParent.cpp index ff56a16ecd32..03283013b493 100644 --- a/netwerk/protocol/http/HttpChannelParent.cpp +++ b/netwerk/protocol/http/HttpChannelParent.cpp @@ -31,7 +31,7 @@ #include "mozilla/ipc/BackgroundUtils.h" #include "nsIOService.h" #include "nsICachingChannel.h" -#include "nsQueryObject.h" + using namespace mozilla::dom; using namespace mozilla::ipc; diff --git a/netwerk/protocol/http/nsHttpChannel.cpp b/netwerk/protocol/http/nsHttpChannel.cpp index c1e1818a27cb..943e9781205b 100644 --- a/netwerk/protocol/http/nsHttpChannel.cpp +++ b/netwerk/protocol/http/nsHttpChannel.cpp @@ -71,7 +71,6 @@ #include "nsIHttpPushListener.h" #include "nsIX509Cert.h" #include "ScopedNSSTypes.h" -#include "nsQueryObject.h" namespace mozilla { namespace net { diff --git a/profile/dirserviceprovider/nsProfileLock.cpp b/profile/dirserviceprovider/nsProfileLock.cpp index 510ee29f3f22..0344f1bd9bfd 100644 --- a/profile/dirserviceprovider/nsProfileLock.cpp +++ b/profile/dirserviceprovider/nsProfileLock.cpp @@ -6,7 +6,6 @@ #include "nsProfileStringTypes.h" #include "nsProfileLock.h" #include "nsCOMPtr.h" -#include "nsQueryObject.h" #if defined(XP_WIN) #include "mozilla/ProfileUnlockerWin.h" diff --git a/toolkit/components/places/nsNavHistoryResult.cpp b/toolkit/components/places/nsNavHistoryResult.cpp index b5e5550a87a2..1d90b77ca1b6 100644 --- a/toolkit/components/places/nsNavHistoryResult.cpp +++ b/toolkit/components/places/nsNavHistoryResult.cpp @@ -18,7 +18,6 @@ #include "nsUnicharUtils.h" #include "prtime.h" #include "prprf.h" -#include "nsQueryObject.h" #include "nsCycleCollectionParticipant.h" diff --git a/uriloader/base/nsDocLoader.cpp b/uriloader/base/nsDocLoader.cpp index b3b4c2aa4f16..f7ce1262468c 100644 --- a/uriloader/base/nsDocLoader.cpp +++ b/uriloader/base/nsDocLoader.cpp @@ -20,7 +20,6 @@ #include "nscore.h" #include "nsWeakPtr.h" #include "nsAutoPtr.h" -#include "nsQueryObject.h" #include "nsIDOMWindow.h" diff --git a/widget/cocoa/nsDeviceContextSpecX.mm b/widget/cocoa/nsDeviceContextSpecX.mm index 4ed5e2aeb0c3..6b28c9379422 100644 --- a/widget/cocoa/nsDeviceContextSpecX.mm +++ b/widget/cocoa/nsDeviceContextSpecX.mm @@ -9,7 +9,6 @@ #include #include "nsAutoPtr.h" -#include "nsQueryObject.h" #include "nsIServiceManager.h" #include "nsIPrintOptions.h" #include "nsPrintSettingsX.h" diff --git a/widget/cocoa/nsMenuUtilsX.mm b/widget/cocoa/nsMenuUtilsX.mm index d0865124a943..e55a50756cd3 100644 --- a/widget/cocoa/nsMenuUtilsX.mm +++ b/widget/cocoa/nsMenuUtilsX.mm @@ -17,7 +17,6 @@ #include "nsIDOMDocument.h" #include "nsIDOMXULCommandEvent.h" #include "nsPIDOMWindow.h" -#include "nsQueryObject.h" using namespace mozilla; diff --git a/widget/cocoa/nsPrintDialogX.mm b/widget/cocoa/nsPrintDialogX.mm index 35b3d2287953..4320fe19edb7 100644 --- a/widget/cocoa/nsPrintDialogX.mm +++ b/widget/cocoa/nsPrintDialogX.mm @@ -9,7 +9,6 @@ #include "nsIPrintSettings.h" #include "nsPrintSettingsX.h" #include "nsCOMPtr.h" -#include "nsQueryObject.h" #include "nsServiceManagerUtils.h" #include "nsIWebProgressListener.h" #include "nsIStringBundle.h" diff --git a/widget/cocoa/nsPrintOptionsX.mm b/widget/cocoa/nsPrintOptionsX.mm index db72392dc3b3..2ebedf7bb2e7 100644 --- a/widget/cocoa/nsPrintOptionsX.mm +++ b/widget/cocoa/nsPrintOptionsX.mm @@ -4,7 +4,6 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "nsCOMPtr.h" -#include "nsQueryObject.h" #include "nsIServiceManager.h" #include "nsPrintOptionsX.h" #include "nsPrintSettingsX.h" diff --git a/widget/windows/LSPAnnotator.cpp b/widget/windows/LSPAnnotator.cpp index 0f001ef37c9f..98ac8b88f6b1 100644 --- a/widget/windows/LSPAnnotator.cpp +++ b/widget/windows/LSPAnnotator.cpp @@ -15,7 +15,6 @@ #include "nsISupportsImpl.h" #include "nsServiceManagerUtils.h" #include "nsThreadUtils.h" -#include "nsQueryObject.h" #include #include diff --git a/xpcom/base/moz.build b/xpcom/base/moz.build index 500e987593b3..e44b41d8c313 100644 --- a/xpcom/base/moz.build +++ b/xpcom/base/moz.build @@ -57,7 +57,6 @@ EXPORTS += [ 'nsISupportsBase.h', 'nsISupportsObsolete.h', 'nsObjCExceptions.h', - 'nsQueryObject.h', 'nsRefPtr.h', 'nsStackWalk.h', 'nsTraceRefcnt.h', diff --git a/xpcom/base/nsAutoPtr.h b/xpcom/base/nsAutoPtr.h index 9c3afb48f29d..d5710ac82c12 100644 --- a/xpcom/base/nsAutoPtr.h +++ b/xpcom/base/nsAutoPtr.h @@ -758,4 +758,95 @@ operator!=(NSCAP_Zero* aLhs, const nsAutoArrayPtr& aRhs) return reinterpret_cast(aLhs) != static_cast(aRhs.get()); } + +/*****************************************************************************/ + +template +class nsQueryObject : public nsCOMPtr_helper +{ +public: + explicit nsQueryObject(T* aRawPtr) + : mRawPtr(aRawPtr) + { + } + + virtual nsresult NS_FASTCALL operator()(const nsIID& aIID, + void** aResult) const + { + nsresult status = mRawPtr ? mRawPtr->QueryInterface(aIID, aResult) + : NS_ERROR_NULL_POINTER; + return status; + } +private: + T* mRawPtr; +}; + +template +class nsQueryObjectWithError : public nsCOMPtr_helper +{ +public: + nsQueryObjectWithError(T* aRawPtr, nsresult* aErrorPtr) + : mRawPtr(aRawPtr), mErrorPtr(aErrorPtr) + { + } + + virtual nsresult NS_FASTCALL operator()(const nsIID& aIID, + void** aResult) const + { + nsresult status = mRawPtr ? mRawPtr->QueryInterface(aIID, aResult) + : NS_ERROR_NULL_POINTER; + if (mErrorPtr) { + *mErrorPtr = status; + } + return status; + } +private: + T* mRawPtr; + nsresult* mErrorPtr; +}; + +template +inline nsQueryObject +do_QueryObject(T* aRawPtr) +{ + return nsQueryObject(aRawPtr); +} + +template +inline nsQueryObject +do_QueryObject(nsCOMPtr& aRawPtr) +{ + return nsQueryObject(aRawPtr); +} + +template +inline nsQueryObject +do_QueryObject(nsRefPtr& aRawPtr) +{ + return nsQueryObject(aRawPtr); +} + +template +inline nsQueryObjectWithError +do_QueryObject(T* aRawPtr, nsresult* aErrorPtr) +{ + return nsQueryObjectWithError(aRawPtr, aErrorPtr); +} + +template +inline nsQueryObjectWithError +do_QueryObject(nsCOMPtr& aRawPtr, nsresult* aErrorPtr) +{ + return nsQueryObjectWithError(aRawPtr, aErrorPtr); +} + +template +inline nsQueryObjectWithError +do_QueryObject(nsRefPtr& aRawPtr, nsresult* aErrorPtr) +{ + return nsQueryObjectWithError(aRawPtr, aErrorPtr); +} + +/*****************************************************************************/ + #endif // !defined(nsAutoPtr_h) diff --git a/xpcom/base/nsQueryObject.h b/xpcom/base/nsQueryObject.h deleted file mode 100644 index dceabeb69a9a..000000000000 --- a/xpcom/base/nsQueryObject.h +++ /dev/null @@ -1,107 +0,0 @@ -/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* vim: set ts=8 sts=2 et sw=2 tw=80: */ -/* This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ - -#ifndef nsQueryObject_h -#define nsQueryObject_h - -#include "nsCOMPtr.h" -#include "nsRefPtr.h" - -/*****************************************************************************/ - -template -class nsQueryObject : public nsCOMPtr_helper -{ -public: - explicit nsQueryObject(T* aRawPtr) - : mRawPtr(aRawPtr) - { - } - - virtual nsresult NS_FASTCALL operator()(const nsIID& aIID, - void** aResult) const - { - nsresult status = mRawPtr ? mRawPtr->QueryInterface(aIID, aResult) - : NS_ERROR_NULL_POINTER; - return status; - } -private: - T* mRawPtr; -}; - -template -class nsQueryObjectWithError : public nsCOMPtr_helper -{ -public: - nsQueryObjectWithError(T* aRawPtr, nsresult* aErrorPtr) - : mRawPtr(aRawPtr), mErrorPtr(aErrorPtr) - { - } - - virtual nsresult NS_FASTCALL operator()(const nsIID& aIID, - void** aResult) const - { - nsresult status = mRawPtr ? mRawPtr->QueryInterface(aIID, aResult) - : NS_ERROR_NULL_POINTER; - if (mErrorPtr) { - *mErrorPtr = status; - } - return status; - } -private: - T* mRawPtr; - nsresult* mErrorPtr; -}; - -/*****************************************************************************/ - -/*****************************************************************************/ - -template -inline nsQueryObject -do_QueryObject(T* aRawPtr) -{ - return nsQueryObject(aRawPtr); -} - -template -inline nsQueryObject -do_QueryObject(nsCOMPtr& aRawPtr) -{ - return nsQueryObject(aRawPtr); -} - -template -inline nsQueryObject -do_QueryObject(nsRefPtr& aRawPtr) -{ - return nsQueryObject(aRawPtr); -} - -template -inline nsQueryObjectWithError -do_QueryObject(T* aRawPtr, nsresult* aErrorPtr) -{ - return nsQueryObjectWithError(aRawPtr, aErrorPtr); -} - -template -inline nsQueryObjectWithError -do_QueryObject(nsCOMPtr& aRawPtr, nsresult* aErrorPtr) -{ - return nsQueryObjectWithError(aRawPtr, aErrorPtr); -} - -template -inline nsQueryObjectWithError -do_QueryObject(nsRefPtr& aRawPtr, nsresult* aErrorPtr) -{ - return nsQueryObjectWithError(aRawPtr, aErrorPtr); -} - -/*****************************************************************************/ - -#endif // !defined(nsQueryObject_h) diff --git a/xpcom/tests/TestNsRefPtr.cpp b/xpcom/tests/TestNsRefPtr.cpp index ecf941bf8a01..55a503a82c7f 100644 --- a/xpcom/tests/TestNsRefPtr.cpp +++ b/xpcom/tests/TestNsRefPtr.cpp @@ -8,7 +8,6 @@ #include "nsCOMPtr.h" #include "nsAutoPtr.h" #include "nsISupports.h" -#include "nsQueryObject.h" #define NS_FOO_IID \ { 0x6f7652e0, 0xee43, 0x11d1, \ diff --git a/xpfe/appshell/nsXULWindow.cpp b/xpfe/appshell/nsXULWindow.cpp index fcebf2f44d6e..a8d8b1afe2ca 100644 --- a/xpfe/appshell/nsXULWindow.cpp +++ b/xpfe/appshell/nsXULWindow.cpp @@ -50,7 +50,6 @@ #include "nsContentUtils.h" #include "nsWebShellWindow.h" // get rid of this one, too... #include "nsGlobalWindow.h" -#include "nsQueryObject.h" #include "prenv.h" #include "mozilla/AutoRestore.h"