From 3abca0bf7e6c0ddaddd8deed04c28b8ef7feddfc Mon Sep 17 00:00:00 2001 From: "warren@netscape.com" Date: Tue, 30 Nov 1999 04:50:42 +0000 Subject: [PATCH] Landing no_neckoutil2_branch. Bug #11159. Removes neckoutil_s.lib from build which helps beos and openvms. --- chrome/src/nsChromeRegistry.cpp | 2 +- config/autoconf.mk.in | 1 - content/base/src/nsGenericElement.cpp | 2 +- .../html/content/src/nsGenericHTMLElement.cpp | 2 +- .../html/content/src/nsHTMLAnchorElement.cpp | 2 +- .../html/content/src/nsHTMLImageElement.cpp | 2 +- .../html/document/src/nsHTMLContentSink.cpp | 10 +- content/html/document/src/nsHTMLDocument.cpp | 2 +- content/html/style/src/nsCSSLoader.cpp | 5 +- content/html/style/src/nsCSSParser.cpp | 2 +- content/html/style/src/nsCSSStyleSheet.cpp | 2 +- content/html/style/src/nsHTMLStyleSheet.cpp | 2 +- content/xml/document/src/nsXMLContentSink.cpp | 5 +- content/xul/document/src/nsXULContentSink.cpp | 2 +- content/xul/document/src/nsXULDocument.cpp | 8 +- .../xul/templates/src/nsXULContentUtils.cpp | 2 +- docshell/base/nsDocShell.cpp | 2 +- docshell/base/nsWebShell.cpp | 2 +- dom/src/base/nsGlobalWindow.cpp | 2 +- dom/src/base/nsLocation.cpp | 2 +- dom/src/build/Makefile.in | 1 - dom/src/build/makefile.win | 5 - dom/src/jsurl/nsJSProtocolHandler.cpp | 17 +- editor/base/makefile.win | 5 - editor/base/nsEditor.cpp | 2 +- editor/base/nsEditorShell.cpp | 2 +- editor/base/nsHTMLEditor.cpp | 2 +- editor/composer/src/nsEditorShell.cpp | 2 +- editor/libeditor/base/nsEditor.cpp | 2 +- editor/libeditor/html/nsHTMLEditor.cpp | 2 +- extensions/pics/src/makefile.win | 10 -- extensions/pics/src/nsPICS.cpp | 2 +- gfx/src/Makefile.in | 1 - gfx/src/nsImageNetContextAsync.cpp | 2 +- gfx/src/nsImageURL.cpp | 2 +- gfx/src/windows/makefile.win | 10 +- htmlparser/src/Makefile.in | 1 - htmlparser/src/makefile.win | 11 -- htmlparser/src/nsExpatTokenizer.cpp | 2 +- intl/strres/src/Makefile.in | 1 - intl/strres/src/makefile.win | 4 - intl/strres/src/nsStringBundle.cpp | 4 +- intl/strres/tests/Makefile.in | 1 - intl/uconv/src/makefile.win | 8 - intl/uconv/src/nsURLProperties.cpp | 3 +- intl/unicharutil/src/makefile.win | 1 - intl/unicharutil/src/nsEntityConverter.cpp | 2 +- intl/unicharutil/tests/UnicharSelfTest.cpp | 2 +- layout/base/src/nsGenericElement.cpp | 2 +- layout/base/src/nsPluginViewer.cpp | 2 +- layout/build/Makefile.in | 1 - layout/build/makefile.win | 10 -- layout/build/nsLayoutModule.cpp | 2 +- layout/generic/nsFrameFrame.cpp | 2 +- layout/generic/nsImageFrame.cpp | 2 +- layout/generic/nsImageMap.cpp | 2 +- layout/generic/nsObjectFrame.cpp | 2 +- layout/html/base/src/nsHTMLImageLoader.cpp | 2 +- layout/html/base/src/nsImageFrame.cpp | 2 +- layout/html/base/src/nsImageMap.cpp | 2 +- layout/html/base/src/nsObjectFrame.cpp | 2 +- .../html/content/src/nsGenericHTMLElement.cpp | 2 +- .../html/content/src/nsHTMLAnchorElement.cpp | 2 +- .../html/content/src/nsHTMLImageElement.cpp | 2 +- layout/html/document/src/nsFrameFrame.cpp | 2 +- .../html/document/src/nsHTMLContentSink.cpp | 10 +- layout/html/document/src/nsHTMLDocument.cpp | 2 +- layout/html/forms/src/nsFormFrame.cpp | 2 +- layout/html/style/src/nsCSSLoader.cpp | 5 +- layout/html/style/src/nsCSSParser.cpp | 2 +- layout/html/style/src/nsCSSStyleSheet.cpp | 2 +- layout/html/style/src/nsHTMLStyleSheet.cpp | 2 +- layout/html/tests/Makefile.in | 1 - layout/html/tests/TestCSSParser.cpp | 2 +- layout/html/tests/TestCSSScanner.cpp | 2 +- layout/html/tests/makefile.win | 10 -- layout/style/nsCSSLoader.cpp | 5 +- layout/style/nsCSSParser.cpp | 2 +- layout/style/nsCSSStyleSheet.cpp | 2 +- layout/style/nsHTMLStyleSheet.cpp | 2 +- layout/xml/document/src/nsXMLContentSink.cpp | 5 +- modules/libjar/nsJARChannel.cpp | 2 +- modules/libjar/nsJARURI.cpp | 2 +- modules/plugin/base/src/makefile.win | 6 - modules/plugin/base/src/nsPluginHostImpl.cpp | 3 +- modules/plugin/base/src/nsPluginViewer.cpp | 2 +- modules/plugin/nglsrc/makefile.win | 6 - modules/plugin/nglsrc/nsPluginHostImpl.cpp | 3 +- modules/plugin/nglsrc/nsPluginViewer.cpp | 2 +- netwerk/Makefile.in | 1 - netwerk/base/public/MANIFEST | 1 + netwerk/base/public/Makefile.in | 1 + netwerk/base/public/makefile.win | 1 + netwerk/base/public/nsIChannel.idl | 2 +- netwerk/base/public/nsIIOService.idl | 39 ----- netwerk/base/public/nsILoadGroup.idl | 2 +- netwerk/base/public/nsIStreamListener.idl | 65 +++++-- netwerk/base/public/nsIStreamObserver.idl | 37 +++- .../base/public/nsIUnicharStreamLoader.idl | 28 +-- netwerk/base/public/nsNetUtil.h | 138 ++++++++++++++- netwerk/base/src/nsAsyncStreamListener.cpp | 163 ++++++------------ netwerk/base/src/nsAsyncStreamListener.h | 26 +-- netwerk/base/src/nsFileTransport.cpp | 16 +- netwerk/base/src/nsIOService.cpp | 51 ------ netwerk/base/src/nsInputStreamChannel.cpp | 13 +- netwerk/base/src/nsSocketTransport.cpp | 13 +- netwerk/base/src/nsSyncStreamListener.cpp | 83 ++------- netwerk/base/src/nsUnicharStreamLoader.cpp | 8 +- netwerk/build/nsNetModule.cpp | 6 +- netwerk/protocol/about/src/nsAboutBlank.cpp | 12 +- netwerk/protocol/about/src/nsAboutBloat.cpp | 10 +- netwerk/protocol/data/src/nsDataChannel.cpp | 7 +- netwerk/protocol/file/src/nsFileChannel.h | 5 - netwerk/protocol/jar/src/makefile.win | 1 - netwerk/protocol/jar/src/nsJARChannel.cpp | 2 +- netwerk/protocol/jar/src/nsJARURI.cpp | 2 +- .../converters/nsFTPDirListingConv.cpp | 19 +- .../converters/nsMultiMixedConv.cpp | 22 +-- netwerk/streamconv/test/TestStreamConv.cpp | 18 +- netwerk/test/Makefile.in | 1 - netwerk/util/public/MANIFEST | 1 - parser/htmlparser/src/Makefile.in | 1 - parser/htmlparser/src/makefile.win | 11 -- parser/htmlparser/src/nsExpatTokenizer.cpp | 2 +- profile/pref-migrator/src/Makefile.in | 1 - profile/pref-migrator/src/makefile.win | 5 - profile/pref-migrator/src/nsPrefMigration.cpp | 2 +- profile/src/Makefile.in | 1 - profile/src/makefile.win | 1 - profile/src/nsProfile.cpp | 2 +- rdf/base/src/nsRDFXMLDataSource.cpp | 2 +- rdf/base/src/rdfutil.cpp | 2 +- rdf/build/Makefile.in | 1 - rdf/build/makefile.win | 5 - rdf/chrome/src/nsChromeRegistry.cpp | 2 +- rdf/content/src/nsXULContentSink.cpp | 2 +- rdf/content/src/nsXULContentUtils.cpp | 2 +- rdf/content/src/nsXULDocument.cpp | 8 +- rdf/tests/rdfcat/Makefile.in | 1 - rdf/tests/rdfcat/makefile.win | 5 - rdf/tests/rdfpoll/Makefile.in | 1 - rdf/tests/rdfpoll/makefile.win | 5 - uriloader/base/nsDocLoader.cpp | 4 +- .../embed/gtk/lib/GtkMozillaContainer.cpp | 20 +-- webshell/src/Makefile.in | 1 - webshell/src/makefile.win | 5 - webshell/src/nsDocLoader.cpp | 4 +- webshell/src/nsWebShell.cpp | 2 +- webshell/tests/viewer/Makefile.in | 1 - webshell/tests/viewer/makefile.win | 5 - webshell/tests/viewer/nsWebCrawler.cpp | 2 +- xpcom/build/nsXPComInit.cpp | 2 + xpcom/io/nsIFile.idl | 2 + xpcom/tests/CvtURL.cpp | 2 +- xpcom/tests/Makefile.in | 1 - xpfe/AppCores/src/makefile.win | 5 - xpfe/appshell/src/Makefile.in | 1 - xpfe/appshell/src/makefile.win | 7 - xpfe/appshell/src/nsAppShellFactory.cpp | 8 +- xpfe/appshell/src/nsAppShellService.cpp | 2 +- xpfe/appshell/src/nsDefaultHelper.cpp | 1 - xpfe/appshell/src/nsNetSupportDialog.cpp | 2 +- xpfe/appshell/src/nsWebShellWindow.cpp | 5 +- xpfe/bootstrap/Makefile.in | 1 - xpfe/bootstrap/makefile.win | 5 - xpfe/bootstrap/nsAppRunner.cpp | 29 +++- xpfe/components/bookmarks/src/Makefile.in | 1 - xpfe/components/bookmarks/src/makefile.win | 1 - .../bookmarks/src/nsBookmarksService.cpp | 2 +- xpfe/components/directory/Makefile.in | 1 - xpfe/components/directory/makefile.win | 1 - .../directory/nsDirectoryViewer.cpp | 2 +- xpfe/components/regviewer/Makefile.in | 1 - xpfe/components/related/src/Makefile.in | 1 - xpfe/components/related/src/makefile.win | 5 - .../related/src/nsRelatedLinksHandler.cpp | 2 +- xpfe/components/search/src/Makefile.in | 1 - xpfe/components/search/src/makefile.win | 1 - .../search/src/nsInternetSearchService.cpp | 2 +- xpfe/components/xfer/src/Makefile.in | 1 - xpfe/components/xfer/src/makefile.win | 5 - xpfe/components/xfer/src/nsStreamTransfer.cpp | 2 +- xpfe/components/xfer/src/nsStreamXferOp.cpp | 2 +- xpinstall/src/Makefile.in | 1 - xpinstall/src/makefile.win | 5 - xpinstall/src/nsInstall.cpp | 2 +- xpinstall/src/nsInstallProgressDialog.cpp | 2 +- xpinstall/src/nsXPInstallManager.cpp | 2 +- 188 files changed, 547 insertions(+), 758 deletions(-) diff --git a/chrome/src/nsChromeRegistry.cpp b/chrome/src/nsChromeRegistry.cpp index ac08d32a2ba9..5d4e1fb435e4 100644 --- a/chrome/src/nsChromeRegistry.cpp +++ b/chrome/src/nsChromeRegistry.cpp @@ -39,7 +39,7 @@ #include "nsString.h" #include "nsXPIDLString.h" #include "nsISimpleEnumerator.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsFileLocations.h" #include "nsIFileLocator.h" #include "nsIDOMWindow.h" diff --git a/config/autoconf.mk.in b/config/autoconf.mk.in index ca3dd53fa6ff..9c17a6077fdb 100644 --- a/config/autoconf.mk.in +++ b/config/autoconf.mk.in @@ -35,7 +35,6 @@ USE_NSPR_AUTOCONF = @USE_NSPR_AUTOCONF@ ### XXX ### BROKEN MOZ_USING_XLIBRGB = @MOZ_USING_XLIBRGB@ MOZ_TIMER_LIBS = @MOZ_TIMER_LIBS@ -MOZ_NECKO_UTIL_LIBS = $(DIST)/lib/libneckoutil_s.a MOZ_REGISTRY_LIBS = $(DIST)/lib/libmozreg_s.a MOZ_WIDGET_SUPPORT_LIBS = $(DIST)/lib/libwidgetsupport_s.a diff --git a/content/base/src/nsGenericElement.cpp b/content/base/src/nsGenericElement.cpp index 778213256a55..d3f83af1ce78 100644 --- a/content/base/src/nsGenericElement.cpp +++ b/content/base/src/nsGenericElement.cpp @@ -40,7 +40,7 @@ #include "nsISizeOfHandler.h" #include "nsISupportsArray.h" #include "nsIURL.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsFrame.h" #include "nsIPresShell.h" #include "nsIView.h" diff --git a/content/html/content/src/nsGenericHTMLElement.cpp b/content/html/content/src/nsGenericHTMLElement.cpp index f9ad8caf9258..6fd0928bda47 100644 --- a/content/html/content/src/nsGenericHTMLElement.cpp +++ b/content/html/content/src/nsGenericHTMLElement.cpp @@ -47,7 +47,7 @@ #include "nsIStyleRule.h" #include "nsISupportsArray.h" #include "nsIURL.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsStyleConsts.h" #include "nsXIFConverter.h" #include "nsFrame.h" diff --git a/content/html/content/src/nsHTMLAnchorElement.cpp b/content/html/content/src/nsHTMLAnchorElement.cpp index 05c6bb4cb132..b1b808ff8f3f 100644 --- a/content/html/content/src/nsHTMLAnchorElement.cpp +++ b/content/html/content/src/nsHTMLAnchorElement.cpp @@ -36,7 +36,7 @@ #include "nsIEventStateManager.h" #include "nsDOMEvent.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsCOMPtr.h" #include "nsIFrameManager.h" diff --git a/content/html/content/src/nsHTMLImageElement.cpp b/content/html/content/src/nsHTMLImageElement.cpp index 1b16b040d902..c7d4f5f1e2f5 100644 --- a/content/html/content/src/nsHTMLImageElement.cpp +++ b/content/html/content/src/nsHTMLImageElement.cpp @@ -44,7 +44,7 @@ #include "nsIIOService.h" #include "nsIURL.h" #include "nsIServiceManager.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID); // XXX nav attrs: suppress diff --git a/content/html/document/src/nsHTMLContentSink.cpp b/content/html/document/src/nsHTMLContentSink.cpp index 26bb66184e22..a80eaccb9c67 100644 --- a/content/html/document/src/nsHTMLContentSink.cpp +++ b/content/html/document/src/nsHTMLContentSink.cpp @@ -28,7 +28,7 @@ #include "nsIHTMLContentContainer.h" #include "nsIURL.h" #include "nsIUnicharStreamLoader.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsIPresShell.h" #include "nsIPresContext.h" #include "nsIViewManager.h" @@ -1940,7 +1940,10 @@ HTMLContentSink::~HTMLContentSink() } } -NS_IMPL_ISUPPORTS2(HTMLContentSink, nsIHTMLContentSink, nsIUnicharStreamLoaderObserver) +NS_IMPL_ISUPPORTS3(HTMLContentSink, + nsIHTMLContentSink, + nsIContentSink, + nsIUnicharStreamLoaderObserver) nsresult HTMLContentSink::Init(nsIDocument* aDoc, @@ -3634,10 +3637,11 @@ HTMLContentSink::EvaluateScript(nsString& aScript, NS_IMETHODIMP HTMLContentSink::OnUnicharStreamComplete(nsIUnicharStreamLoader* aLoader, nsresult aStatus, + PRUint32 stringLen, const PRUnichar* string) { nsresult rv = NS_OK; - nsString aData(string); + nsString aData(string, stringLen); if (NS_OK == aStatus) { PRBool bodyPresent = PreEvaluateScript(); diff --git a/content/html/document/src/nsHTMLDocument.cpp b/content/html/document/src/nsHTMLDocument.cpp index 5774eab390a9..0b11620648fc 100644 --- a/content/html/document/src/nsHTMLDocument.cpp +++ b/content/html/document/src/nsHTMLDocument.cpp @@ -48,7 +48,7 @@ #include "nsIURL.h" #include "nsIIOService.h" #include "nsIURL.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsIContentViewerContainer.h" #include "nsIContentViewer.h" #include "nsIMarkupDocumentViewer.h" diff --git a/content/html/style/src/nsCSSLoader.cpp b/content/html/style/src/nsCSSLoader.cpp index 0d1483c52d5f..8377ee0abb53 100644 --- a/content/html/style/src/nsCSSLoader.cpp +++ b/content/html/style/src/nsCSSLoader.cpp @@ -37,7 +37,7 @@ #include "nsIURL.h" #include "nsIURL.h" #include "nsIServiceManager.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsCRT.h" #include "nsVoidArray.h" #include "nsISupportsArray.h" @@ -593,9 +593,10 @@ CSSLoaderImpl::RecycleParser(nsICSSParser* aParser) NS_IMETHODIMP SheetLoadData::OnUnicharStreamComplete(nsIUnicharStreamLoader* aLoader, nsresult aStatus, + PRUint32 stringLen, const PRUnichar* string) { - nsString aStyleData(string); + nsString aStyleData(string, stringLen); mLoader->DidLoadStyle(aLoader, aStyleData, this, aStatus); // We added a reference when the loader was created. This diff --git a/content/html/style/src/nsCSSParser.cpp b/content/html/style/src/nsCSSParser.cpp index 628bc8e26665..6d8501b0e3ee 100644 --- a/content/html/style/src/nsCSSParser.cpp +++ b/content/html/style/src/nsCSSParser.cpp @@ -35,7 +35,7 @@ #include "nsICSSDeclaration.h" #include "nsStyleConsts.h" #include "nsIURL.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsCOMPtr.h" #include "nsString.h" #include "nsIAtom.h" diff --git a/content/html/style/src/nsCSSStyleSheet.cpp b/content/html/style/src/nsCSSStyleSheet.cpp index 8d6474fc1814..603e64d4e1b7 100644 --- a/content/html/style/src/nsCSSStyleSheet.cpp +++ b/content/html/style/src/nsCSSStyleSheet.cpp @@ -28,7 +28,7 @@ #include "nsIIOService.h" #include "nsIURL.h" #include "nsIServiceManager.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID); #include "nsISupportsArray.h" #include "nsHashtable.h" diff --git a/content/html/style/src/nsHTMLStyleSheet.cpp b/content/html/style/src/nsHTMLStyleSheet.cpp index a4ed55ddf445..0954ddd06411 100644 --- a/content/html/style/src/nsHTMLStyleSheet.cpp +++ b/content/html/style/src/nsHTMLStyleSheet.cpp @@ -28,7 +28,7 @@ #include "nsIIOService.h" #include "nsIURL.h" #include "nsIServiceManager.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID); #include "nsISupportsArray.h" #include "nsHashtable.h" diff --git a/content/xml/document/src/nsXMLContentSink.cpp b/content/xml/document/src/nsXMLContentSink.cpp index 85fef515ab3d..82e03c9c111c 100644 --- a/content/xml/document/src/nsXMLContentSink.cpp +++ b/content/xml/document/src/nsXMLContentSink.cpp @@ -30,7 +30,7 @@ #include "nsIScriptObjectOwner.h" #include "nsIURL.h" #include "nsIURL.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsIWebShell.h" #include "nsIContent.h" #include "nsITextContent.h" @@ -1714,10 +1714,11 @@ IsJavaScriptLanguage(const nsString& aName, const char* *aVersion) NS_IMETHODIMP nsXMLContentSink::OnUnicharStreamComplete(nsIUnicharStreamLoader* aLoader, nsresult aStatus, + PRUint32 stringLen, const PRUnichar* string) { nsresult rv = NS_OK; - nsString aData(string); + nsString aData(string, stringLen); if (NS_OK == aStatus) { rv = EvaluateScript(aData, 0, mScriptLanguageVersion); diff --git a/content/xul/document/src/nsXULContentSink.cpp b/content/xul/document/src/nsXULContentSink.cpp index f5cfb3e8ceaa..7adda7c51b6a 100644 --- a/content/xul/document/src/nsXULContentSink.cpp +++ b/content/xul/document/src/nsXULContentSink.cpp @@ -74,7 +74,7 @@ #include "nsIXULPrototypeDocument.h" #include "nsIXULPrototypeCache.h" #include "nsLayoutCID.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsRDFCID.h" #include "nsRDFParserUtils.h" #include "nsVoidArray.h" diff --git a/content/xul/document/src/nsXULDocument.cpp b/content/xul/document/src/nsXULDocument.cpp index 235aa166aa57..45fbf3438162 100644 --- a/content/xul/document/src/nsXULDocument.cpp +++ b/content/xul/document/src/nsXULDocument.cpp @@ -105,7 +105,7 @@ #include "nsIXULPrototypeCache.h" #include "nsLWBrkCIID.h" #include "nsLayoutCID.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsParserCIID.h" #include "nsRDFCID.h" #include "nsRDFDOMNodeList.h" @@ -4828,9 +4828,10 @@ nsXULDocument::LoadScript(nsXULPrototypeScript* aScriptProto, PRBool* aBlock) } -nsresult +NS_IMETHODIMP nsXULDocument::OnUnicharStreamComplete(nsIUnicharStreamLoader* aLoader, nsresult aStatus, + PRUint32 stringLen, const PRUnichar* string) { // This is the completion routine that will be called when a @@ -4854,8 +4855,7 @@ nsXULDocument::OnUnicharStreamComplete(nsIUnicharStreamLoader* aLoader, scriptProto->mSrcLoading = PR_FALSE; if (NS_SUCCEEDED(aStatus)) { - // XXXbe bug warren to provide string length from caller too - rv = scriptProto->Compile(string, nsCRT::strlen(string), + rv = scriptProto->Compile(string, stringLen, scriptProto->mSrcURI, 1, this); aStatus = rv; diff --git a/content/xul/templates/src/nsXULContentUtils.cpp b/content/xul/templates/src/nsXULContentUtils.cpp index f7fb35dc83e2..4f484dab68e7 100644 --- a/content/xul/templates/src/nsXULContentUtils.cpp +++ b/content/xul/templates/src/nsXULContentUtils.cpp @@ -55,7 +55,7 @@ #include "nsIXULContentUtils.h" #include "nsIXULPrototypeCache.h" #include "nsLayoutCID.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsRDFCID.h" #include "nsString.h" #include "nsXPIDLString.h" diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp index 94093d761af8..f1cd44f527a9 100644 --- a/docshell/base/nsDocShell.cpp +++ b/docshell/base/nsDocShell.cpp @@ -30,7 +30,7 @@ #include "nsIDeviceContext.h" #include "nsCURILoader.h" #include "nsLayoutCID.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsRect.h" #include "prprf.h" #include "nsIFrame.h" diff --git a/docshell/base/nsWebShell.cpp b/docshell/base/nsWebShell.cpp index ce21b5b7311b..309246376350 100644 --- a/docshell/base/nsWebShell.cpp +++ b/docshell/base/nsWebShell.cpp @@ -30,7 +30,7 @@ #include "nsILinkHandler.h" #include "nsIStreamListener.h" #include "nsIPrompt.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsIProtocolHandler.h" #include "nsIDNSService.h" #include "nsIRefreshURI.h" diff --git a/dom/src/base/nsGlobalWindow.cpp b/dom/src/base/nsGlobalWindow.cpp index b966f3aac526..f3df82116f9b 100644 --- a/dom/src/base/nsGlobalWindow.cpp +++ b/dom/src/base/nsGlobalWindow.cpp @@ -75,7 +75,7 @@ #include "nsIJSContextStack.h" #include "nsIIOService.h" #include "nsIURL.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsRDFCID.h" #include "nsDOMPropEnums.h" #include "nsXPIDLString.h" diff --git a/dom/src/base/nsLocation.cpp b/dom/src/base/nsLocation.cpp index aeef8acc2b99..c947e1e5f2ed 100644 --- a/dom/src/base/nsLocation.cpp +++ b/dom/src/base/nsLocation.cpp @@ -26,7 +26,7 @@ #include "nsIIOService.h" #include "nsIURL.h" #include "nsIServiceManager.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID); #include "plstr.h" #include "prmem.h" diff --git a/dom/src/build/Makefile.in b/dom/src/build/Makefile.in index 69fb1f983e40..2b6cf97efcd7 100644 --- a/dom/src/build/Makefile.in +++ b/dom/src/build/Makefile.in @@ -51,7 +51,6 @@ EXTRA_DSO_LDOPTS = \ $(MKSHLIB_FORCE_ALL) \ $(SHARED_LIBRARY_LIBS) \ $(MKSHLIB_UNFORCE_ALL) \ - $(MOZ_NECKO_UTIL_LIBS) \ $(MOZ_TIMER_LIBS) \ $(MOZ_COMPONENT_LIBS) \ -lmozjs \ diff --git a/dom/src/build/makefile.win b/dom/src/build/makefile.win index b8cebc36a099..72451c1e28ee 100644 --- a/dom/src/build/makefile.win +++ b/dom/src/build/makefile.win @@ -53,11 +53,6 @@ LLIBS= \ $(DIST)\lib\jsdomhtml_s.lib \ $(DIST)\lib\jsdomcss_s.lib \ $(DIST)\lib\gkgfxwin.lib \ -!ifdef NECKO - $(DIST)\lib\neckoutil_s.lib \ -!else - $(DIST)\lib\netlib.lib \ -!endif $(DIST)\lib\js32$(VERSION_NUMBER).lib \ $(DIST)\lib\xpcom.lib \ $(DIST)\lib\plds3.lib \ diff --git a/dom/src/jsurl/nsJSProtocolHandler.cpp b/dom/src/jsurl/nsJSProtocolHandler.cpp index 2318c7ccfcc0..b6c96e94ccc7 100644 --- a/dom/src/jsurl/nsJSProtocolHandler.cpp +++ b/dom/src/jsurl/nsJSProtocolHandler.cpp @@ -26,7 +26,7 @@ #include "nsIComponentManager.h" #include "nsIGenericFactory.h" #include "nsIServiceManager.h" -#include "nsIIOService.h" +#include "nsNetUtil.h" #include "nsIInputStream.h" #include "nsIStringStream.h" #include "nsIURI.h" @@ -329,13 +329,6 @@ nsJSProtocolHandler::NewChannel(const char* verb, } #endif - NS_WITH_SERVICE(nsIIOService, serv, kIOServiceCID, &rv); - if (NS_FAILED(rv)) { - if (retString) - Recycle(retString); - return rv; - } - nsCOMPtr s; rv = NS_NewStringInputStream(getter_AddRefs(s), retString); int length = PL_strlen(retString); @@ -349,10 +342,10 @@ nsJSProtocolHandler::NewChannel(const char* verb, nsIChannel* channel; - rv = serv->NewInputStreamChannel(uri, "text/html", length, - in, aLoadGroup, - notificationCallbacks, loadAttributes, - originalURI, &channel); + rv = NS_NewInputStreamChannel(uri, "text/html", length, + in, aLoadGroup, + notificationCallbacks, loadAttributes, + originalURI, &channel); if (NS_FAILED(rv)) return rv; diff --git a/editor/base/makefile.win b/editor/base/makefile.win index b08c34ded0fc..05173256c247 100644 --- a/editor/base/makefile.win +++ b/editor/base/makefile.win @@ -128,11 +128,6 @@ LLIBS= \ $(DIST)\lib\js3250.lib \ $(DIST)\lib\gkparser.lib \ $(DIST)\lib\raptorwidget_s.lib \ -!ifdef NECKO - $(DIST)\lib\neckoutil_s.lib \ -!else - $(DIST)\lib\netlib.lib \ -!endif $(LIBNSPR) !if "$(MOZ_BITS)"=="32" && defined(MOZ_DEBUG) && defined(GLOWCODE) LLIBS=$(LLIBS) $(GLOWDIR)\glowcode.lib diff --git a/editor/base/nsEditor.cpp b/editor/base/nsEditor.cpp index 64ed3d3df4e4..c871f9531e2c 100644 --- a/editor/base/nsEditor.cpp +++ b/editor/base/nsEditor.cpp @@ -63,7 +63,7 @@ #include "nsIStringStream.h" #include "nsITextContent.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsIContent.h" #include "nsIContentIterator.h" diff --git a/editor/base/nsEditorShell.cpp b/editor/base/nsEditorShell.cpp index 156465c3c816..be94536c58fa 100644 --- a/editor/base/nsEditorShell.cpp +++ b/editor/base/nsEditorShell.cpp @@ -46,7 +46,7 @@ #include "nsIHTMLContentContainer.h" #include "nsIStyleSet.h" #include "nsIURI.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsIScriptGlobalObject.h" #include "nsIWebShell.h" diff --git a/editor/base/nsHTMLEditor.cpp b/editor/base/nsHTMLEditor.cpp index 45bba0ab991b..5d3660b216fb 100644 --- a/editor/base/nsHTMLEditor.cpp +++ b/editor/base/nsHTMLEditor.cpp @@ -72,7 +72,7 @@ // netwerk #include "nsIURI.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" // Drag & Drop, Clipboard #include "nsWidgetsCID.h" diff --git a/editor/composer/src/nsEditorShell.cpp b/editor/composer/src/nsEditorShell.cpp index 156465c3c816..be94536c58fa 100644 --- a/editor/composer/src/nsEditorShell.cpp +++ b/editor/composer/src/nsEditorShell.cpp @@ -46,7 +46,7 @@ #include "nsIHTMLContentContainer.h" #include "nsIStyleSet.h" #include "nsIURI.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsIScriptGlobalObject.h" #include "nsIWebShell.h" diff --git a/editor/libeditor/base/nsEditor.cpp b/editor/libeditor/base/nsEditor.cpp index 64ed3d3df4e4..c871f9531e2c 100644 --- a/editor/libeditor/base/nsEditor.cpp +++ b/editor/libeditor/base/nsEditor.cpp @@ -63,7 +63,7 @@ #include "nsIStringStream.h" #include "nsITextContent.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsIContent.h" #include "nsIContentIterator.h" diff --git a/editor/libeditor/html/nsHTMLEditor.cpp b/editor/libeditor/html/nsHTMLEditor.cpp index 45bba0ab991b..5d3660b216fb 100644 --- a/editor/libeditor/html/nsHTMLEditor.cpp +++ b/editor/libeditor/html/nsHTMLEditor.cpp @@ -72,7 +72,7 @@ // netwerk #include "nsIURI.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" // Drag & Drop, Clipboard #include "nsWidgetsCID.h" diff --git a/extensions/pics/src/makefile.win b/extensions/pics/src/makefile.win index ff3ff4a82c73..cd6476392f29 100644 --- a/extensions/pics/src/makefile.win +++ b/extensions/pics/src/makefile.win @@ -60,11 +60,6 @@ LINCS = -I$(PUBLIC)/js \ -I$(PUBLIC)\xpcom \ -I$(PUBLIC)\raptor \ -I$(PUBLIC)\pref \ -!ifdef NECKO - -I$(PUBLIC)\necko \ -!else - -I$(PUBLIC)\netlib \ -!endif -I$(DEPTH)\include \ MAKE_OBJ_TYPE = DLL @@ -81,11 +76,6 @@ LCFLAGS = \ LLIBS = \ $(LIBNSPR) \ $(DIST)\lib\js$(MOZ_BITS)$(VERSION_NUMBER).lib \ -!ifdef NECKO - $(DIST)\lib\neckoutil_s.lib \ -!else - $(DIST)\lib\netlib.lib \ -!endif $(DIST)\lib\xpcom.lib \ $(DIST)\lib\xpcom.lib \ $(DIST)\lib\gkparser.lib \ diff --git a/extensions/pics/src/nsPICS.cpp b/extensions/pics/src/nsPICS.cpp index 2047c7c8bee5..b143855cb991 100644 --- a/extensions/pics/src/nsPICS.cpp +++ b/extensions/pics/src/nsPICS.cpp @@ -30,7 +30,7 @@ #include "nsIPICS.h" #include "nsIPref.h" #include "nsIURL.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsCOMPtr.h" #include "nsIParser.h" #include "nsParserCIID.h" diff --git a/gfx/src/Makefile.in b/gfx/src/Makefile.in index 87701eddc4cd..29826cc25225 100644 --- a/gfx/src/Makefile.in +++ b/gfx/src/Makefile.in @@ -77,7 +77,6 @@ CPPSRCS = \ $(NULL) EXTRA_DSO_LDOPTS = \ - $(MOZ_NECKO_UTIL_LIBS) \ $(MOZ_TIMER_LIBS) \ $(DIST)/lib/libimg_s.a \ $(DIST)/lib/libmozutil_s.a \ diff --git a/gfx/src/nsImageNetContextAsync.cpp b/gfx/src/nsImageNetContextAsync.cpp index 9d597681dd8b..45a0478b8c0e 100644 --- a/gfx/src/nsImageNetContextAsync.cpp +++ b/gfx/src/nsImageNetContextAsync.cpp @@ -42,7 +42,7 @@ //#include "il_strm.h" #include "merrors.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" static NS_DEFINE_IID(kIImageNetContextIID, IL_INETCONTEXT_IID); static NS_DEFINE_IID(kIURLIID, NS_IURL_IID); diff --git a/gfx/src/nsImageURL.cpp b/gfx/src/nsImageURL.cpp index 0e9d2e64978e..8d7632453ee2 100644 --- a/gfx/src/nsImageURL.cpp +++ b/gfx/src/nsImageURL.cpp @@ -27,7 +27,7 @@ #include "ilIURL.h" #include "nsIURL.h" #include "nsIURL.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsString.h" diff --git a/gfx/src/windows/makefile.win b/gfx/src/windows/makefile.win index dc39954eb159..a45059758685 100644 --- a/gfx/src/windows/makefile.win +++ b/gfx/src/windows/makefile.win @@ -45,26 +45,26 @@ OBJS = \ $(NULL) EXPORTS= nsIRenderingContextWin.h \ - nsIDrawingSurfaceWin.h + nsIDrawingSurfaceWin.h LINCS= \ - -I..\ + -I..\ -I$(PUBLIC)\raptor \ -I$(PUBLIC)\xpcom \ -I$(PUBLIC)\dom \ -I$(PUBLIC)\js \ !if defined(NGLAYOUT_DDRAW) !if "$(MOZ_VCVER)" == "50" - -I$(NGLAYOUT_DDRAW)\include \ + -I$(NGLAYOUT_DDRAW)\include \ !else - -I$(NGLAYOUT_DDRAW)\inc \ + -I$(NGLAYOUT_DDRAW)\inc \ !endif !endif $(NULL) LCFLAGS = \ $(LCFLAGS) \ - $(DEFINES) \ + $(DEFINES) \ $(NULL) include <$(DEPTH)\config\rules.mak> diff --git a/htmlparser/src/Makefile.in b/htmlparser/src/Makefile.in index 209c647ffa20..37b159119130 100644 --- a/htmlparser/src/Makefile.in +++ b/htmlparser/src/Makefile.in @@ -109,7 +109,6 @@ EXPORTS = \ EXPORTS := $(addprefix $(srcdir)/, $(EXPORTS)) EXTRA_DSO_LDOPTS = \ - $(MOZ_NECKO_UTIL_LIBS) \ $(DIST)/lib/libexpat_s.a \ $(DIST)/lib/libxmltok_s.a \ $(NULL) diff --git a/htmlparser/src/makefile.win b/htmlparser/src/makefile.win index 93bba6902fef..b9fc7e23e6a6 100644 --- a/htmlparser/src/makefile.win +++ b/htmlparser/src/makefile.win @@ -132,11 +132,6 @@ EXPORTS= \ LINCS= -I$(PUBLIC)\xpcom \ -I$(PUBLIC)\raptor \ -!ifdef NECKO - -I$(PUBLIC)\necko \ -!else - -I$(PUBLIC)\netlib \ -!endif -I$(PUBLIC)\uconv \ -I$(PUBLIC)\expat @@ -153,12 +148,6 @@ LCFLAGS = \ LLIBS= \ $(DIST)\lib\xpcom.lib \ $(DIST)\lib\expat.lib \ -!ifdef NECKO - $(DIST)\lib\neckoutil_s.lib \ -!endif -!ifdef MOZ_PERF - $(DIST)\lib\util.lib \ -!endif $(LIBNSPR) !ifdef MOZ_NO_DEBUG_RTL diff --git a/htmlparser/src/nsExpatTokenizer.cpp b/htmlparser/src/nsExpatTokenizer.cpp index 494f5a009676..67f9ecd7f218 100644 --- a/htmlparser/src/nsExpatTokenizer.cpp +++ b/htmlparser/src/nsExpatTokenizer.cpp @@ -36,7 +36,7 @@ #include "prmem.h" #include "nsIUnicharInputStream.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsIServiceManager.h" #include "nsCOMPtr.h" #include "nsSpecialSystemDirectory.h" diff --git a/intl/strres/src/Makefile.in b/intl/strres/src/Makefile.in index c525b18f385d..e7ac19f7b6e2 100644 --- a/intl/strres/src/Makefile.in +++ b/intl/strres/src/Makefile.in @@ -38,4 +38,3 @@ EXTRA_DSO_LDOPTS =\ $(NULL) include $(topsrcdir)/config/rules.mk - diff --git a/intl/strres/src/makefile.win b/intl/strres/src/makefile.win index 1d63ec67fe86..1f6df20ed1ad 100644 --- a/intl/strres/src/makefile.win +++ b/intl/strres/src/makefile.win @@ -59,10 +59,6 @@ LLIBS= \ $(DIST)\lib\xpcom.lib \ $(LIBNSPR) -!ifdef NECKO -LLIBS=$(LLIBS) $(DIST)\lib\neckoutil_s.lib -!endif - !if "$(MOZ_BITS)"=="32" && defined(MOZ_DEBUG) && defined(GLOWCODE) LLIBS=$(LLIBS) $(GLOWDIR)\glowcode.lib !endif diff --git a/intl/strres/src/nsStringBundle.cpp b/intl/strres/src/nsStringBundle.cpp index af817ed8d1da..5dd7bbd65240 100644 --- a/intl/strres/src/nsStringBundle.cpp +++ b/intl/strres/src/nsStringBundle.cpp @@ -30,9 +30,7 @@ #include "nsILocale.h" #include "nsIAllocator.h" #include "plstr.h" - -#include "nsNeckoUtil.h" - +#include "nsNetUtil.h" #include "nsIURL.h" #include "nsIComponentManager.h" #include "nsIServiceManager.h" diff --git a/intl/strres/tests/Makefile.in b/intl/strres/tests/Makefile.in index cd36a15051ad..3e378dcc8352 100644 --- a/intl/strres/tests/Makefile.in +++ b/intl/strres/tests/Makefile.in @@ -41,7 +41,6 @@ EXPORT_RESOURCE = \ LIBS = \ -lmozjs \ -lxpcom \ - $(MOZ_NECKO_UTIL_LIBS) \ $(MOZ_TIMER_LIBS) \ $(NSPR_LIBS) \ $(NULL) diff --git a/intl/uconv/src/makefile.win b/intl/uconv/src/makefile.win index 62c18aae9b16..63cbe37f6b71 100644 --- a/intl/uconv/src/makefile.win +++ b/intl/uconv/src/makefile.win @@ -78,20 +78,12 @@ LINCS= \ -I$(PUBLIC)\raptor \ -I$(PUBLIC)\xpcom \ -I$(PUBLIC)\uconv \ -#ifdef NECKO - -I$(PUBLIC)\necko \ -#else - -I$(PUBLIC)\netlib \ -#endif -I..\ucvja \ -I..\ucvlatin \ $(NULL) LLIBS= \ $(DIST)\lib\xpcom.lib \ -!ifdef NECKO - $(DIST)\lib\neckoutil_s.lib \ -!endif $(LIBNSPR) LCFLAGS = \ diff --git a/intl/uconv/src/nsURLProperties.cpp b/intl/uconv/src/nsURLProperties.cpp index 96e9a8ae2a9a..c6f1cac4b127 100644 --- a/intl/uconv/src/nsURLProperties.cpp +++ b/intl/uconv/src/nsURLProperties.cpp @@ -24,8 +24,7 @@ #include "nsIServiceManager.h" #include "nsIComponentManager.h" #include "nsIURL.h" - -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" static NS_DEFINE_IID(kIPersistentPropertiesIID, NS_IPERSISTENTPROPERTIES_IID); diff --git a/intl/unicharutil/src/makefile.win b/intl/unicharutil/src/makefile.win index 57b955668491..c7d043bfbd99 100644 --- a/intl/unicharutil/src/makefile.win +++ b/intl/unicharutil/src/makefile.win @@ -63,7 +63,6 @@ DLL=.\$(OBJDIR)\$(DLLNAME).dll LLIBS= \ $(DIST)\lib\xpcom.lib \ - $(DIST)\lib\neckoutil_s.lib \ $(LIBNSPR) include <$(DEPTH)\config\rules.mak> diff --git a/intl/unicharutil/src/nsEntityConverter.cpp b/intl/unicharutil/src/nsEntityConverter.cpp index da6bc5cd827c..f637020adb03 100644 --- a/intl/unicharutil/src/nsEntityConverter.cpp +++ b/intl/unicharutil/src/nsEntityConverter.cpp @@ -25,7 +25,7 @@ #include "nsIServiceManager.h" #include "nsIComponentManager.h" #include "nsIURL.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" // // guids diff --git a/intl/unicharutil/tests/UnicharSelfTest.cpp b/intl/unicharutil/tests/UnicharSelfTest.cpp index 3ae78bea55d5..d37d9ae375e8 100644 --- a/intl/unicharutil/tests/UnicharSelfTest.cpp +++ b/intl/unicharutil/tests/UnicharSelfTest.cpp @@ -30,7 +30,7 @@ #include "nsUnicharUtilCIID.h" #include "nsIProperties.h" #include "nsIURL.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsCOMPtr.h" NS_DEFINE_CID(kUnicharUtilCID, NS_UNICHARUTIL_CID); diff --git a/layout/base/src/nsGenericElement.cpp b/layout/base/src/nsGenericElement.cpp index 778213256a55..d3f83af1ce78 100644 --- a/layout/base/src/nsGenericElement.cpp +++ b/layout/base/src/nsGenericElement.cpp @@ -40,7 +40,7 @@ #include "nsISizeOfHandler.h" #include "nsISupportsArray.h" #include "nsIURL.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsFrame.h" #include "nsIPresShell.h" #include "nsIView.h" diff --git a/layout/base/src/nsPluginViewer.cpp b/layout/base/src/nsPluginViewer.cpp index 20726f093e03..128930c4419f 100644 --- a/layout/base/src/nsPluginViewer.cpp +++ b/layout/base/src/nsPluginViewer.cpp @@ -28,7 +28,7 @@ #include "nsIStreamListener.h" #include "nsIURL.h" #include "nsIChannel.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsIComponentManager.h" #include "nsWidgetsCID.h" #include "nsILinkHandler.h" diff --git a/layout/build/Makefile.in b/layout/build/Makefile.in index 7d6d8c596834..edcbd8f84f75 100644 --- a/layout/build/Makefile.in +++ b/layout/build/Makefile.in @@ -77,7 +77,6 @@ EXTRA_DSO_LDOPTS = \ $(MKSHLIB_FORCE_ALL) \ $(SHARED_LIBRARY_LIBS) \ $(MKSHLIB_UNFORCE_ALL) \ - $(MOZ_NECKO_UTIL_LIBS) \ $(MOZ_TIMER_LIBS) \ -L$(DIST)/bin \ $(NSPR_LIBS) \ diff --git a/layout/build/makefile.win b/layout/build/makefile.win index 3ebb33008c56..f58a7cd2ec5c 100644 --- a/layout/build/makefile.win +++ b/layout/build/makefile.win @@ -54,11 +54,6 @@ LINCS=-I$(PUBLIC)\xpcom -I$(PUBLIC)\raptor -I$(PUBLIC)\dom \ -I..\xul\content\src \ !ifdef MOZ_MATHML -I..\mathml\content\src \ -!endif -!ifdef NECKO - -I$(PUBLIC)\necko \ -!else - -I$(PUBLIC)\netlib \ !endif -I$(PUBLIC)\rdf @@ -87,11 +82,6 @@ LLIBS= \ $(DIST)\lib\gkgfxwin.lib \ $(DIST)\lib\timer_s.lib \ $(DIST)\lib\jsdom.lib \ -!ifdef NECKO - $(DIST)\lib\neckoutil_s.lib \ -!else - $(DIST)\lib\netlib.lib \ -!endif $(DIST)\lib\js32$(VERSION_NUMBER).lib \ !if defined(MOZ_DEBUG) && defined(GLOWCODE) && "$(MOZ_BITS)"=="32" $(GLOWDIR)\glowcode.lib \ diff --git a/layout/build/nsLayoutModule.cpp b/layout/build/nsLayoutModule.cpp index a98e786ce7ab..a7f1cc16578e 100644 --- a/layout/build/nsLayoutModule.cpp +++ b/layout/build/nsLayoutModule.cpp @@ -23,7 +23,7 @@ #include "nsLayoutModule.h" #include "nsLayoutCID.h" #include "nsIComponentManager.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsICSSStyleSheet.h" #include "nsICSSLoader.h" #include "nsHTMLAtoms.h" diff --git a/layout/generic/nsFrameFrame.cpp b/layout/generic/nsFrameFrame.cpp index 68e3125e9409..d7d7bdcf7d12 100644 --- a/layout/generic/nsFrameFrame.cpp +++ b/layout/generic/nsFrameFrame.cpp @@ -33,7 +33,7 @@ #include "nsIComponentManager.h" #include "nsIStreamListener.h" #include "nsIURL.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsIDocument.h" #include "nsIView.h" #include "nsIViewManager.h" diff --git a/layout/generic/nsImageFrame.cpp b/layout/generic/nsImageFrame.cpp index 04792afdda9e..98a5bede1b17 100644 --- a/layout/generic/nsImageFrame.cpp +++ b/layout/generic/nsImageFrame.cpp @@ -42,7 +42,7 @@ #include "nsIIOService.h" #include "nsIURL.h" #include "nsIServiceManager.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID); #include "nsIView.h" #include "nsIViewManager.h" diff --git a/layout/generic/nsImageMap.cpp b/layout/generic/nsImageMap.cpp index 100bf6c8a3b0..2afaff7ab161 100644 --- a/layout/generic/nsImageMap.cpp +++ b/layout/generic/nsImageMap.cpp @@ -28,7 +28,7 @@ #include "nsIURL.h" #include "nsIURL.h" #include "nsIServiceManager.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsXIFConverter.h" #include "nsISizeOfHandler.h" #include "nsTextFragment.h" diff --git a/layout/generic/nsObjectFrame.cpp b/layout/generic/nsObjectFrame.cpp index 43d7c70b518d..59495239f675 100644 --- a/layout/generic/nsObjectFrame.cpp +++ b/layout/generic/nsObjectFrame.cpp @@ -35,7 +35,7 @@ #include "nsHTMLAtoms.h" #include "nsIDocument.h" #include "nsIURL.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsIPluginInstanceOwner.h" #include "nsIHTMLContent.h" #include "nsISupportsArray.h" diff --git a/layout/html/base/src/nsHTMLImageLoader.cpp b/layout/html/base/src/nsHTMLImageLoader.cpp index 7c546d8ea804..f5d130ee88c2 100644 --- a/layout/html/base/src/nsHTMLImageLoader.cpp +++ b/layout/html/base/src/nsHTMLImageLoader.cpp @@ -22,7 +22,7 @@ #include "nsHTMLImageLoader.h" #include "nsFrame.h" #include "nsIURL.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #ifdef DEBUG #undef NOISY_IMAGE_LOADING diff --git a/layout/html/base/src/nsImageFrame.cpp b/layout/html/base/src/nsImageFrame.cpp index 04792afdda9e..98a5bede1b17 100644 --- a/layout/html/base/src/nsImageFrame.cpp +++ b/layout/html/base/src/nsImageFrame.cpp @@ -42,7 +42,7 @@ #include "nsIIOService.h" #include "nsIURL.h" #include "nsIServiceManager.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID); #include "nsIView.h" #include "nsIViewManager.h" diff --git a/layout/html/base/src/nsImageMap.cpp b/layout/html/base/src/nsImageMap.cpp index 100bf6c8a3b0..2afaff7ab161 100644 --- a/layout/html/base/src/nsImageMap.cpp +++ b/layout/html/base/src/nsImageMap.cpp @@ -28,7 +28,7 @@ #include "nsIURL.h" #include "nsIURL.h" #include "nsIServiceManager.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsXIFConverter.h" #include "nsISizeOfHandler.h" #include "nsTextFragment.h" diff --git a/layout/html/base/src/nsObjectFrame.cpp b/layout/html/base/src/nsObjectFrame.cpp index 43d7c70b518d..59495239f675 100644 --- a/layout/html/base/src/nsObjectFrame.cpp +++ b/layout/html/base/src/nsObjectFrame.cpp @@ -35,7 +35,7 @@ #include "nsHTMLAtoms.h" #include "nsIDocument.h" #include "nsIURL.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsIPluginInstanceOwner.h" #include "nsIHTMLContent.h" #include "nsISupportsArray.h" diff --git a/layout/html/content/src/nsGenericHTMLElement.cpp b/layout/html/content/src/nsGenericHTMLElement.cpp index f9ad8caf9258..6fd0928bda47 100644 --- a/layout/html/content/src/nsGenericHTMLElement.cpp +++ b/layout/html/content/src/nsGenericHTMLElement.cpp @@ -47,7 +47,7 @@ #include "nsIStyleRule.h" #include "nsISupportsArray.h" #include "nsIURL.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsStyleConsts.h" #include "nsXIFConverter.h" #include "nsFrame.h" diff --git a/layout/html/content/src/nsHTMLAnchorElement.cpp b/layout/html/content/src/nsHTMLAnchorElement.cpp index 05c6bb4cb132..b1b808ff8f3f 100644 --- a/layout/html/content/src/nsHTMLAnchorElement.cpp +++ b/layout/html/content/src/nsHTMLAnchorElement.cpp @@ -36,7 +36,7 @@ #include "nsIEventStateManager.h" #include "nsDOMEvent.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsCOMPtr.h" #include "nsIFrameManager.h" diff --git a/layout/html/content/src/nsHTMLImageElement.cpp b/layout/html/content/src/nsHTMLImageElement.cpp index 1b16b040d902..c7d4f5f1e2f5 100644 --- a/layout/html/content/src/nsHTMLImageElement.cpp +++ b/layout/html/content/src/nsHTMLImageElement.cpp @@ -44,7 +44,7 @@ #include "nsIIOService.h" #include "nsIURL.h" #include "nsIServiceManager.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID); // XXX nav attrs: suppress diff --git a/layout/html/document/src/nsFrameFrame.cpp b/layout/html/document/src/nsFrameFrame.cpp index 68e3125e9409..d7d7bdcf7d12 100644 --- a/layout/html/document/src/nsFrameFrame.cpp +++ b/layout/html/document/src/nsFrameFrame.cpp @@ -33,7 +33,7 @@ #include "nsIComponentManager.h" #include "nsIStreamListener.h" #include "nsIURL.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsIDocument.h" #include "nsIView.h" #include "nsIViewManager.h" diff --git a/layout/html/document/src/nsHTMLContentSink.cpp b/layout/html/document/src/nsHTMLContentSink.cpp index 26bb66184e22..a80eaccb9c67 100644 --- a/layout/html/document/src/nsHTMLContentSink.cpp +++ b/layout/html/document/src/nsHTMLContentSink.cpp @@ -28,7 +28,7 @@ #include "nsIHTMLContentContainer.h" #include "nsIURL.h" #include "nsIUnicharStreamLoader.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsIPresShell.h" #include "nsIPresContext.h" #include "nsIViewManager.h" @@ -1940,7 +1940,10 @@ HTMLContentSink::~HTMLContentSink() } } -NS_IMPL_ISUPPORTS2(HTMLContentSink, nsIHTMLContentSink, nsIUnicharStreamLoaderObserver) +NS_IMPL_ISUPPORTS3(HTMLContentSink, + nsIHTMLContentSink, + nsIContentSink, + nsIUnicharStreamLoaderObserver) nsresult HTMLContentSink::Init(nsIDocument* aDoc, @@ -3634,10 +3637,11 @@ HTMLContentSink::EvaluateScript(nsString& aScript, NS_IMETHODIMP HTMLContentSink::OnUnicharStreamComplete(nsIUnicharStreamLoader* aLoader, nsresult aStatus, + PRUint32 stringLen, const PRUnichar* string) { nsresult rv = NS_OK; - nsString aData(string); + nsString aData(string, stringLen); if (NS_OK == aStatus) { PRBool bodyPresent = PreEvaluateScript(); diff --git a/layout/html/document/src/nsHTMLDocument.cpp b/layout/html/document/src/nsHTMLDocument.cpp index 5774eab390a9..0b11620648fc 100644 --- a/layout/html/document/src/nsHTMLDocument.cpp +++ b/layout/html/document/src/nsHTMLDocument.cpp @@ -48,7 +48,7 @@ #include "nsIURL.h" #include "nsIIOService.h" #include "nsIURL.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsIContentViewerContainer.h" #include "nsIContentViewer.h" #include "nsIMarkupDocumentViewer.h" diff --git a/layout/html/forms/src/nsFormFrame.cpp b/layout/html/forms/src/nsFormFrame.cpp index 087148a6c613..b3b788285c73 100644 --- a/layout/html/forms/src/nsFormFrame.cpp +++ b/layout/html/forms/src/nsFormFrame.cpp @@ -60,7 +60,7 @@ #include "nsIIOService.h" #include "nsIURL.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID); #include "nsIDocument.h" #include "nsILinkHandler.h" diff --git a/layout/html/style/src/nsCSSLoader.cpp b/layout/html/style/src/nsCSSLoader.cpp index 0d1483c52d5f..8377ee0abb53 100644 --- a/layout/html/style/src/nsCSSLoader.cpp +++ b/layout/html/style/src/nsCSSLoader.cpp @@ -37,7 +37,7 @@ #include "nsIURL.h" #include "nsIURL.h" #include "nsIServiceManager.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsCRT.h" #include "nsVoidArray.h" #include "nsISupportsArray.h" @@ -593,9 +593,10 @@ CSSLoaderImpl::RecycleParser(nsICSSParser* aParser) NS_IMETHODIMP SheetLoadData::OnUnicharStreamComplete(nsIUnicharStreamLoader* aLoader, nsresult aStatus, + PRUint32 stringLen, const PRUnichar* string) { - nsString aStyleData(string); + nsString aStyleData(string, stringLen); mLoader->DidLoadStyle(aLoader, aStyleData, this, aStatus); // We added a reference when the loader was created. This diff --git a/layout/html/style/src/nsCSSParser.cpp b/layout/html/style/src/nsCSSParser.cpp index 628bc8e26665..6d8501b0e3ee 100644 --- a/layout/html/style/src/nsCSSParser.cpp +++ b/layout/html/style/src/nsCSSParser.cpp @@ -35,7 +35,7 @@ #include "nsICSSDeclaration.h" #include "nsStyleConsts.h" #include "nsIURL.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsCOMPtr.h" #include "nsString.h" #include "nsIAtom.h" diff --git a/layout/html/style/src/nsCSSStyleSheet.cpp b/layout/html/style/src/nsCSSStyleSheet.cpp index 8d6474fc1814..603e64d4e1b7 100644 --- a/layout/html/style/src/nsCSSStyleSheet.cpp +++ b/layout/html/style/src/nsCSSStyleSheet.cpp @@ -28,7 +28,7 @@ #include "nsIIOService.h" #include "nsIURL.h" #include "nsIServiceManager.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID); #include "nsISupportsArray.h" #include "nsHashtable.h" diff --git a/layout/html/style/src/nsHTMLStyleSheet.cpp b/layout/html/style/src/nsHTMLStyleSheet.cpp index a4ed55ddf445..0954ddd06411 100644 --- a/layout/html/style/src/nsHTMLStyleSheet.cpp +++ b/layout/html/style/src/nsHTMLStyleSheet.cpp @@ -28,7 +28,7 @@ #include "nsIIOService.h" #include "nsIURL.h" #include "nsIServiceManager.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID); #include "nsISupportsArray.h" #include "nsHashtable.h" diff --git a/layout/html/tests/Makefile.in b/layout/html/tests/Makefile.in index 3ea7c228c662..224387fbed47 100644 --- a/layout/html/tests/Makefile.in +++ b/layout/html/tests/Makefile.in @@ -44,7 +44,6 @@ LIBS = \ $(DIST)/lib/libraptorhtmltable_s.a \ $(DIST)/lib/libraptorlayout_s.a \ $(DIST)/lib/libraptorevents_s.a \ - $(MOZ_NECKO_UTIL_LIBS) \ $(MOZ_TIMER_LIBS) \ -lmozjs \ -lraptorgfx \ diff --git a/layout/html/tests/TestCSSParser.cpp b/layout/html/tests/TestCSSParser.cpp index 22b674ae5eed..994317f9d3c8 100644 --- a/layout/html/tests/TestCSSParser.cpp +++ b/layout/html/tests/TestCSSParser.cpp @@ -24,7 +24,7 @@ #include "nsICSSStyleSheet.h" #include "nsIStyleRule.h" #include "nsIURL.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsIIOService.h" #include "nsIURL.h" #include "nsIInputStream.h" diff --git a/layout/html/tests/TestCSSScanner.cpp b/layout/html/tests/TestCSSScanner.cpp index c387020c4dda..053375dd020b 100644 --- a/layout/html/tests/TestCSSScanner.cpp +++ b/layout/html/tests/TestCSSScanner.cpp @@ -22,7 +22,7 @@ #include #include "nsCSSScanner.h" #include "nsIURL.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsIIOService.h" #include "nsIURL.h" #include "nsIServiceManager.h" diff --git a/layout/html/tests/makefile.win b/layout/html/tests/makefile.win index 5797b87bc1c0..6a25901b5741 100644 --- a/layout/html/tests/makefile.win +++ b/layout/html/tests/makefile.win @@ -41,11 +41,6 @@ LINCS= \ -I$(PUBLIC)\raptor \ -I$(PUBLIC)\dom \ -I$(PUBLIC)\js \ -!ifdef NECKO - -I$(PUBLIC)\necko \ -!else - -I$(PUBLIC)\netlib \ -!endif -I..\base\src \ -I..\style\src \ -I..\..\css\layout\src \ @@ -66,11 +61,6 @@ LLIBS= \ $(DIST)\lib\util.lib \ $(DIST)\lib\xpcom.lib \ $(DIST)\lib\jsdom.lib \ -!ifdef NECKO - $(DIST)\lib\neckoutil_s.lib \ -!else - $(DIST)\lib\netlib.lib \ -!endif $(DIST)\lib\timer_s.lib \ $(LIBNSPR) \ $(DIST)\lib\js32$(VERSION_NUMBER).lib diff --git a/layout/style/nsCSSLoader.cpp b/layout/style/nsCSSLoader.cpp index 0d1483c52d5f..8377ee0abb53 100644 --- a/layout/style/nsCSSLoader.cpp +++ b/layout/style/nsCSSLoader.cpp @@ -37,7 +37,7 @@ #include "nsIURL.h" #include "nsIURL.h" #include "nsIServiceManager.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsCRT.h" #include "nsVoidArray.h" #include "nsISupportsArray.h" @@ -593,9 +593,10 @@ CSSLoaderImpl::RecycleParser(nsICSSParser* aParser) NS_IMETHODIMP SheetLoadData::OnUnicharStreamComplete(nsIUnicharStreamLoader* aLoader, nsresult aStatus, + PRUint32 stringLen, const PRUnichar* string) { - nsString aStyleData(string); + nsString aStyleData(string, stringLen); mLoader->DidLoadStyle(aLoader, aStyleData, this, aStatus); // We added a reference when the loader was created. This diff --git a/layout/style/nsCSSParser.cpp b/layout/style/nsCSSParser.cpp index 628bc8e26665..6d8501b0e3ee 100644 --- a/layout/style/nsCSSParser.cpp +++ b/layout/style/nsCSSParser.cpp @@ -35,7 +35,7 @@ #include "nsICSSDeclaration.h" #include "nsStyleConsts.h" #include "nsIURL.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsCOMPtr.h" #include "nsString.h" #include "nsIAtom.h" diff --git a/layout/style/nsCSSStyleSheet.cpp b/layout/style/nsCSSStyleSheet.cpp index 8d6474fc1814..603e64d4e1b7 100644 --- a/layout/style/nsCSSStyleSheet.cpp +++ b/layout/style/nsCSSStyleSheet.cpp @@ -28,7 +28,7 @@ #include "nsIIOService.h" #include "nsIURL.h" #include "nsIServiceManager.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID); #include "nsISupportsArray.h" #include "nsHashtable.h" diff --git a/layout/style/nsHTMLStyleSheet.cpp b/layout/style/nsHTMLStyleSheet.cpp index a4ed55ddf445..0954ddd06411 100644 --- a/layout/style/nsHTMLStyleSheet.cpp +++ b/layout/style/nsHTMLStyleSheet.cpp @@ -28,7 +28,7 @@ #include "nsIIOService.h" #include "nsIURL.h" #include "nsIServiceManager.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID); #include "nsISupportsArray.h" #include "nsHashtable.h" diff --git a/layout/xml/document/src/nsXMLContentSink.cpp b/layout/xml/document/src/nsXMLContentSink.cpp index 85fef515ab3d..82e03c9c111c 100644 --- a/layout/xml/document/src/nsXMLContentSink.cpp +++ b/layout/xml/document/src/nsXMLContentSink.cpp @@ -30,7 +30,7 @@ #include "nsIScriptObjectOwner.h" #include "nsIURL.h" #include "nsIURL.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsIWebShell.h" #include "nsIContent.h" #include "nsITextContent.h" @@ -1714,10 +1714,11 @@ IsJavaScriptLanguage(const nsString& aName, const char* *aVersion) NS_IMETHODIMP nsXMLContentSink::OnUnicharStreamComplete(nsIUnicharStreamLoader* aLoader, nsresult aStatus, + PRUint32 stringLen, const PRUnichar* string) { nsresult rv = NS_OK; - nsString aData(string); + nsString aData(string, stringLen); if (NS_OK == aStatus) { rv = EvaluateScript(aData, 0, mScriptLanguageVersion); diff --git a/modules/libjar/nsJARChannel.cpp b/modules/libjar/nsJARChannel.cpp index 9a31124a07d3..bd11eff7003f 100644 --- a/modules/libjar/nsJARChannel.cpp +++ b/modules/libjar/nsJARChannel.cpp @@ -17,7 +17,7 @@ * */ -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsIComponentManager.h" #include "nsIServiceManager.h" #include "nsIFileSpec.h" diff --git a/modules/libjar/nsJARURI.cpp b/modules/libjar/nsJARURI.cpp index 63e130ed6685..2936694af6a4 100644 --- a/modules/libjar/nsJARURI.cpp +++ b/modules/libjar/nsJARURI.cpp @@ -17,7 +17,7 @@ */ #include "nsJARURI.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsIIOService.h" #include "nsCRT.h" #include "nsIComponentManager.h" diff --git a/modules/plugin/base/src/makefile.win b/modules/plugin/base/src/makefile.win index 9cff1b06abd4..ae52fe1b1a63 100644 --- a/modules/plugin/base/src/makefile.win +++ b/modules/plugin/base/src/makefile.win @@ -76,12 +76,6 @@ CACHELIBNAME=netcache.lib LLIBS = \ $(DIST)\lib\xpcom.lib \ -!ifdef NECKO - $(DIST)\lib\neckoutil_s.lib \ -!else - $(DIST)\lib\netlib.lib \ - $(DIST)\lib\$(CACHELIBNAME) \ -!endif $(DIST)\lib\xppref32.lib \ $(LIBNSPR) diff --git a/modules/plugin/base/src/nsPluginHostImpl.cpp b/modules/plugin/base/src/nsPluginHostImpl.cpp index 945055ce0436..37323c178ea3 100644 --- a/modules/plugin/base/src/nsPluginHostImpl.cpp +++ b/modules/plugin/base/src/nsPluginHostImpl.cpp @@ -40,10 +40,9 @@ #include "nsIURL.h" #include "nsIChannel.h" #include "nsCOMPtr.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsIProgressEventSink.h" #include "nsIDocument.h" -#include "nsNeckoUtil.h" #include "nsIServiceManager.h" #include "nsICookieStorage.h" diff --git a/modules/plugin/base/src/nsPluginViewer.cpp b/modules/plugin/base/src/nsPluginViewer.cpp index 20726f093e03..128930c4419f 100644 --- a/modules/plugin/base/src/nsPluginViewer.cpp +++ b/modules/plugin/base/src/nsPluginViewer.cpp @@ -28,7 +28,7 @@ #include "nsIStreamListener.h" #include "nsIURL.h" #include "nsIChannel.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsIComponentManager.h" #include "nsWidgetsCID.h" #include "nsILinkHandler.h" diff --git a/modules/plugin/nglsrc/makefile.win b/modules/plugin/nglsrc/makefile.win index 9cff1b06abd4..ae52fe1b1a63 100644 --- a/modules/plugin/nglsrc/makefile.win +++ b/modules/plugin/nglsrc/makefile.win @@ -76,12 +76,6 @@ CACHELIBNAME=netcache.lib LLIBS = \ $(DIST)\lib\xpcom.lib \ -!ifdef NECKO - $(DIST)\lib\neckoutil_s.lib \ -!else - $(DIST)\lib\netlib.lib \ - $(DIST)\lib\$(CACHELIBNAME) \ -!endif $(DIST)\lib\xppref32.lib \ $(LIBNSPR) diff --git a/modules/plugin/nglsrc/nsPluginHostImpl.cpp b/modules/plugin/nglsrc/nsPluginHostImpl.cpp index 945055ce0436..37323c178ea3 100644 --- a/modules/plugin/nglsrc/nsPluginHostImpl.cpp +++ b/modules/plugin/nglsrc/nsPluginHostImpl.cpp @@ -40,10 +40,9 @@ #include "nsIURL.h" #include "nsIChannel.h" #include "nsCOMPtr.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsIProgressEventSink.h" #include "nsIDocument.h" -#include "nsNeckoUtil.h" #include "nsIServiceManager.h" #include "nsICookieStorage.h" diff --git a/modules/plugin/nglsrc/nsPluginViewer.cpp b/modules/plugin/nglsrc/nsPluginViewer.cpp index 20726f093e03..128930c4419f 100644 --- a/modules/plugin/nglsrc/nsPluginViewer.cpp +++ b/modules/plugin/nglsrc/nsPluginViewer.cpp @@ -28,7 +28,7 @@ #include "nsIStreamListener.h" #include "nsIURL.h" #include "nsIChannel.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsIComponentManager.h" #include "nsWidgetsCID.h" #include "nsILinkHandler.h" diff --git a/netwerk/Makefile.in b/netwerk/Makefile.in index 3ee635a11213..e05137a91f77 100644 --- a/netwerk/Makefile.in +++ b/netwerk/Makefile.in @@ -32,7 +32,6 @@ DIRS = \ socket \ build \ protocol \ - util \ mime \ streamconv \ $(NULL) diff --git a/netwerk/base/public/MANIFEST b/netwerk/base/public/MANIFEST index 65e2550b23fa..6b12828373d6 100644 --- a/netwerk/base/public/MANIFEST +++ b/netwerk/base/public/MANIFEST @@ -4,3 +4,4 @@ netCore.h nsIProxy.h +nsNetUtil.h diff --git a/netwerk/base/public/Makefile.in b/netwerk/base/public/Makefile.in index f9f0b4cf4326..1b1faa20a2a9 100644 --- a/netwerk/base/public/Makefile.in +++ b/netwerk/base/public/Makefile.in @@ -55,6 +55,7 @@ XPIDLSRCS = \ EXPORTS = \ netCore.h \ nsIProxy.h \ + nsNetUtil.h \ $(NULL) include $(topsrcdir)/config/rules.mk diff --git a/netwerk/base/public/makefile.win b/netwerk/base/public/makefile.win index 686ae4fecbf4..f91bed87dedc 100644 --- a/netwerk/base/public/makefile.win +++ b/netwerk/base/public/makefile.win @@ -27,6 +27,7 @@ include <$(DEPTH)/config/config.mak> EXPORTS = \ netCore.h \ nsIProxy.h \ + nsNetUtil.h \ $(NULL) XPIDLSRCS = \ diff --git a/netwerk/base/public/nsIChannel.idl b/netwerk/base/public/nsIChannel.idl index 7518c411e528..f8a0759a580d 100644 --- a/netwerk/base/public/nsIChannel.idl +++ b/netwerk/base/public/nsIChannel.idl @@ -173,7 +173,7 @@ interface nsIChannel : nsIRequest [scriptable, uuid(bfbf843a-8b89-11d3-8cd9-0060b0fc14a3)] interface nsIInputStreamChannel : nsIChannel { - void Init(in nsIURI uri, + void init(in nsIURI uri, in string contentType, in long contentLength, in nsIInputStream inStr, diff --git a/netwerk/base/public/nsIIOService.idl b/netwerk/base/public/nsIIOService.idl index 2d499f7d8ac3..35913251e784 100644 --- a/netwerk/base/public/nsIIOService.idl +++ b/netwerk/base/public/nsIIOService.idl @@ -117,51 +117,12 @@ interface nsIIOService : nsISupports */ readonly attribute wstring userAgent; - /** - * Returns a new stream observer that marshals data from another - * stream observer over to the thread specified by an event queue. - * If the event queue is null, the current thread's event queue is - * used. - */ - nsIStreamObserver newAsyncStreamObserver(in nsIStreamObserver receiver, - in nsIEventQueue eventQueue); - - /** - * An asynchronous stream listener is used to ship data over to another thread specified - * by the thread's event queue. The receiver stream listener is then used to receive - * the data on the other thread. - */ - nsIStreamListener newAsyncStreamListener(in nsIStreamListener receiver, - in nsIEventQueue eventQueue); - - /** - * A synchronous stream listener pushes data through a pipe that ends up - * in an input stream to be read by another thread. - */ - nsIStreamListener newSyncStreamListener(out nsIInputStream inStream, - out nsIBufferOutputStream outStream); - /** * This convenience routine first looks up the file protocol handler, and * then uses it to construct a file channel from a native path string. */ nsIFileChannel newChannelFromNativePath(in string nativePath); - /** - * Returns a simple channel implementation that uses the given input - * stream and content type. A URI may also be supplied which will be returned - * by the channel's GetURI method. This routine is a convenience facililty - * for protocol writers. - */ - nsIChannel newInputStreamChannel(in nsIURI uri, - in string contentType, - in long contentLength, - in nsIInputStream inStr, - in nsILoadGroup aLoadGroup, - in nsIInterfaceRequestor notificationCallbacks, - in nsLoadFlags loadAttributes, - in nsIURI originalURI); - /** * Utility for protocol implementors -- extracts the scheme from a URL * string, consistently and according to spec. diff --git a/netwerk/base/public/nsILoadGroup.idl b/netwerk/base/public/nsILoadGroup.idl index 5a139d435c36..a532ad2b9efa 100644 --- a/netwerk/base/public/nsILoadGroup.idl +++ b/netwerk/base/public/nsILoadGroup.idl @@ -83,7 +83,7 @@ interface nsILoadGroup : nsIRequest */ readonly attribute nsISimpleEnumerator channels; - attribute nsIStreamObserver groupObserver; + attribute nsIStreamObserver groupObserver; attribute nsILoadGroupListenerFactory groupListenerFactory; diff --git a/netwerk/base/public/nsIStreamListener.idl b/netwerk/base/public/nsIStreamListener.idl index 1f58ff8d7bf8..6739486b72a3 100644 --- a/netwerk/base/public/nsIStreamListener.idl +++ b/netwerk/base/public/nsIStreamListener.idl @@ -37,21 +37,60 @@ interface nsIStreamListener : nsIStreamObserver in unsigned long count); }; +/** + * An asynchronous stream listener is used to ship data over to another thread specified + * by the thread's event queue. The receiver stream listener is then used to receive + * the notifications on the other thread. + * + * This interface only provides the initialization needed after construction. Otherwise, + * these objects are used simply as nsIStreamListener. + */ +[scriptable, uuid(1b012ade-91bf-11d3-8cd9-0060b0fc14a3)] +interface nsIAsyncStreamListener : nsIStreamListener +{ + /** + * Initializes an nsIAsyncStreamListener. + * @param eventQueue - may be null indicating the calling thread's event queue + */ + void init(in nsIStreamListener receiver, + in nsIEventQueue eventQueue); +}; + +/** + * A synchronous stream listener pushes data through a pipe that ends up + * in an input stream to be read by another thread. + * + * This interface only provides the initialization needed after construction. Otherwise, + * these objects are used simply as nsIStreamListener. + */ +[scriptable, uuid(1f9fb93e-91bf-11d3-8cd9-0060b0fc14a3)] +interface nsISyncStreamListener : nsIStreamListener +{ + /** + * Initializes an nsISyncStreamListener. + */ + void init(out nsIInputStream inStream, + out nsIBufferOutputStream outStream); +}; + %{C++ -// An asynchronous stream listener is used to ship data over to another thread specified -// by the thread's event queue. The receiver stream listener is then used to receive -// the data on the other thread. -extern NS_NET nsresult -NS_NewAsyncStreamListener(nsIStreamListener* *result, - nsIEventQueue* eventQueue, - nsIStreamListener* receiver); +// Use this CID to construct an nsIAsyncStreamListener +#define NS_ASYNCSTREAMLISTENER_CID \ +{ /* 60047bb2-91c0-11d3-8cd9-0060b0fc14a3 */ \ + 0x60047bb2, \ + 0x91c0, \ + 0x11d3, \ + {0x8c, 0xd9, 0x00, 0x60, 0xb0, 0xfc, 0x14, 0xa3} \ +} -// A synchronous stream listener pushes data through a pipe that ends up -// in an input stream to be read by another thread. -extern NS_NET nsresult -NS_NewSyncStreamListener(nsIInputStream **inStream, - nsIBufferOutputStream **outStream, - nsIStreamListener **listener); +// Use this CID to construct an nsISyncStreamListener +#define NS_SYNCSTREAMLISTENER_CID \ +{ /* 65fa5cb2-91c0-11d3-8cd9-0060b0fc14a3 */ \ + 0x65fa5cb2, \ + 0x91c0, \ + 0x11d3, \ + {0x8c, 0xd9, 0x00, 0x60, 0xb0, 0xfc, 0x14, 0xa3} \ +} %} diff --git a/netwerk/base/public/nsIStreamObserver.idl b/netwerk/base/public/nsIStreamObserver.idl index 125cfa35a333..a2213d6b4d70 100644 --- a/netwerk/base/public/nsIStreamObserver.idl +++ b/netwerk/base/public/nsIStreamObserver.idl @@ -37,19 +37,42 @@ interface nsIStreamObserver : nsISupports in wstring errorMsg); }; +/** + * An asynchronous stream observer is used to ship data over to another thread specified + * by the thread's event queue. The receiver stream observer is then used to receive + * the notifications on the other thread. + * + * This interface only provides the initialization needed after construction. Otherwise, + * these objects are used simply as nsIStreamObservers. + */ +[scriptable, uuid(a28dc590-91b3-11d3-8cd9-0060b0fc14a3)] +interface nsIAsyncStreamObserver : nsIStreamObserver +{ + /** + * Initializes an nsIAsyncStreamObserver. + * @param eventQueue - may be null indicating the calling thread's event queue + */ + void init(in nsIStreamObserver receiver, + in nsIEventQueue eventQueue); +}; + %{C++ -// An asynchronous stream observer is used to ship data over to another thread specified -// by the thread's event queue. The receiver stream observer is then used to receive -// the notifications on the other thread. -extern NS_NET nsresult -NS_NewAsyncStreamObserver(nsIStreamObserver* *result, - nsIEventQueue* eventQueue, - nsIStreamObserver* receiver); +// Use this CID to construct an nsIAsyncStreamObserver +#define NS_ASYNCSTREAMOBSERVER_CID \ +{ /* fcc7c380-91b3-11d3-8cd9-0060b0fc14a3 */ \ + 0xfcc7c380, \ + 0x91b3, \ + 0x11d3, \ + {0x8c, 0xd9, 0x00, 0x60, 0xb0, 0xfc, 0x14, 0xa3} \ +} +//////////////////////////////////////////////////////////////////////////////// // Generic status codes for OnStopRequest: + #define NS_BINDING_SUCCEEDED NS_OK #define NS_BINDING_FAILED NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 1) #define NS_BINDING_ABORTED NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 2) %} + diff --git a/netwerk/base/public/nsIUnicharStreamLoader.idl b/netwerk/base/public/nsIUnicharStreamLoader.idl index 783eb096960d..21bc260e1eb0 100644 --- a/netwerk/base/public/nsIUnicharStreamLoader.idl +++ b/netwerk/base/public/nsIUnicharStreamLoader.idl @@ -34,7 +34,8 @@ interface nsIUnicharStreamLoaderObserver : nsISupports { void onUnicharStreamComplete(in nsIUnicharStreamLoader loader, in nsresult status, - in wstring result); + in unsigned long resultLength, + [size_is(resultLength)] in wstring result); }; [scriptable, uuid(31d37360-8e5a-11d3-93ad-00104ba0fd40)] @@ -62,29 +63,4 @@ interface nsIUnicharStreamLoader : nsISupports {0x93, 0xad, 0x00, 0x10, 0x4b, 0xa0, 0xfd, 0x40} \ } -#include "nsIComponentManager.h" - -inline nsresult -NS_NewUnicharStreamLoader(nsIUnicharStreamLoader* *result, - nsIURI* uri, - nsIUnicharStreamLoaderObserver* observer, - nsILoadGroup* loadGroup = nsnull, - nsIInterfaceRequestor* notificationCallbacks = nsnull, - nsLoadFlags loadAttributes = nsIChannel::LOAD_NORMAL) -{ - nsresult rv; - nsCOMPtr loader; - static NS_DEFINE_CID(kUnicharStreamLoaderCID, NS_UNICHARSTREAMLOADER_CID); - rv = nsComponentManager::CreateInstance(kUnicharStreamLoaderCID, - nsnull, - NS_GET_IID(nsIUnicharStreamLoader), - getter_AddRefs(loader)); - if (NS_FAILED(rv)) return rv; - rv = loader->Init(uri, observer, loadGroup, notificationCallbacks, loadAttributes); - if (NS_FAILED(rv)) return rv; - *result = loader; - NS_ADDREF(*result); - return rv; -} - %} diff --git a/netwerk/base/public/nsNetUtil.h b/netwerk/base/public/nsNetUtil.h index 0a49086d57c6..ac9de1208309 100644 --- a/netwerk/base/public/nsNetUtil.h +++ b/netwerk/base/public/nsNetUtil.h @@ -67,7 +67,8 @@ NS_NewURI(nsIURI* *result, const nsString& spec, nsIURI* baseURI = nsnull) inline nsresult NS_OpenURI(nsIChannel* *result, nsIURI* uri, nsILoadGroup *aGroup, - nsIInterfaceRequestor *capabilities = nsnull) + nsIInterfaceRequestor *capabilities = nsnull, + nsLoadFlags loadAttributes = nsIChannel::LOAD_NORMAL) { nsresult rv; static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID); @@ -76,7 +77,7 @@ NS_OpenURI(nsIChannel* *result, nsIURI* uri, nsILoadGroup *aGroup, nsIChannel* channel; rv = serv->NewChannelFromURI("load", uri, aGroup, capabilities, - nsnull, &channel); + loadAttributes, nsnull, &channel); if (NS_FAILED(rv)) return rv; *result = channel; @@ -119,6 +120,23 @@ NS_OpenURI(nsIStreamListener* aConsumer, nsISupports* context, nsIURI* uri, inline nsresult NS_MakeAbsoluteURI(const char* spec, nsIURI* baseURI, char* *result) { + nsresult rv; + NS_ASSERTION(baseURI, "It doesn't make sense to not supply a base URI"); + + if (spec == nsnull) + return baseURI->GetSpec(result); + + static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID); + NS_WITH_SERVICE(nsIIOService, serv, kIOServiceCID, &rv); + + PRUint32 startPos, endPos; + rv = serv->ExtractScheme(spec, &startPos, &endPos, nsnull); + if (NS_SUCCEEDED(rv)) { + // if spec has a scheme, then it's already absolute + *result = nsCRT::strdup(spec); + return (*result == nsnull) ? NS_ERROR_OUT_OF_MEMORY : NS_OK; + } + return baseURI->Resolve(spec, result); } @@ -158,11 +176,60 @@ NS_NewPostDataStream(PRBool isFile, const char *data, PRUint32 encodeFlags, return http->NewPostDataStream(isFile, data, encodeFlags, result); } +inline nsresult +NS_NewInputStreamChannel(nsIURI* uri, + const char* contentType, + PRUint32 contentLength, + nsIInputStream* inStr, + nsILoadGroup* group, + nsIInterfaceRequestor* notificationCallbacks, + nsLoadFlags loadAttributes, + nsIURI* originalURI, + nsIChannel **result) +{ + nsresult rv; + nsCOMPtr channel; + static NS_DEFINE_CID(kInputStreamChannelCID, NS_INPUTSTREAMCHANNEL_CID); + rv = nsComponentManager::CreateInstance(kInputStreamChannelCID, + nsnull, + NS_GET_IID(nsIInputStreamChannel), + getter_AddRefs(channel)); + if (NS_FAILED(rv)) return rv; + rv = channel->Init(uri, contentType, contentLength, inStr, group, + notificationCallbacks, loadAttributes, originalURI); + if (NS_FAILED(rv)) return rv; + + *result = channel; + NS_ADDREF(*result); + return NS_OK; +} + +inline nsresult +NS_NewLoadGroup(nsIStreamObserver* obs, nsILoadGroup* *result) +{ + nsresult rv; + nsCOMPtr group; + static NS_DEFINE_CID(kLoadGroupCID, NS_LOADGROUP_CID); + rv = nsComponentManager::CreateInstance(kLoadGroupCID, nsnull, + NS_GET_IID(nsILoadGroup), + getter_AddRefs(group)); + if (NS_FAILED(rv)) return rv; + rv = group->Init(obs); + if (NS_FAILED(rv)) return rv; + + *result = group; + NS_ADDREF(*result); + return NS_OK; +} + + inline nsresult NS_NewUnicharStreamLoader(nsIUnicharStreamLoader* *result, nsIURI* uri, - nsILoadGroup* loadGroup, - nsIUnicharStreamLoaderObserver* observer) + nsIUnicharStreamLoaderObserver* observer, + nsILoadGroup* loadGroup = nsnull, + nsIInterfaceRequestor* notificationCallbacks = nsnull, + nsLoadFlags loadAttributes = nsIChannel::LOAD_NORMAL) { nsresult rv; nsCOMPtr loader; @@ -172,11 +239,72 @@ NS_NewUnicharStreamLoader(nsIUnicharStreamLoader* *result, NS_GET_IID(nsIUnicharStreamLoader), getter_AddRefs(loader)); if (NS_FAILED(rv)) return rv; - rv = loader->Init(uri, loadGroup, observer); + rv = loader->Init(uri, observer, loadGroup, notificationCallbacks, loadAttributes); if (NS_FAILED(rv)) return rv; *result = loader; NS_ADDREF(*result); return rv; } +inline nsresult +NS_NewAsyncStreamObserver(nsIStreamObserver *receiver, nsIEventQueue *eventQueue, + nsIStreamObserver **result) +{ + nsresult rv; + nsCOMPtr obs; + static NS_DEFINE_CID(kAsyncStreamObserverCID, NS_ASYNCSTREAMOBSERVER_CID); + rv = nsComponentManager::CreateInstance(kAsyncStreamObserverCID, + nsnull, + NS_GET_IID(nsIAsyncStreamObserver), + getter_AddRefs(obs)); + if (NS_FAILED(rv)) return rv; + rv = obs->Init(receiver, eventQueue); + if (NS_FAILED(rv)) return rv; + + *result = obs; + NS_ADDREF(*result); + return NS_OK; +} + +inline nsresult +NS_NewAsyncStreamListener(nsIStreamListener *receiver, nsIEventQueue *eventQueue, + nsIStreamListener **result) +{ + nsresult rv; + nsCOMPtr lsnr; + static NS_DEFINE_CID(kAsyncStreamListenerCID, NS_ASYNCSTREAMLISTENER_CID); + rv = nsComponentManager::CreateInstance(kAsyncStreamListenerCID, + nsnull, + NS_GET_IID(nsIAsyncStreamListener), + getter_AddRefs(lsnr)); + if (NS_FAILED(rv)) return rv; + rv = lsnr->Init(receiver, eventQueue); + if (NS_FAILED(rv)) return rv; + + *result = lsnr; + NS_ADDREF(*result); + return NS_OK; +} + +inline nsresult +NS_NewSyncStreamListener(nsIInputStream **inStream, + nsIBufferOutputStream **outStream, + nsIStreamListener **listener) +{ + nsresult rv; + nsCOMPtr lsnr; + static NS_DEFINE_CID(kSyncStreamListenerCID, NS_SYNCSTREAMLISTENER_CID); + rv = nsComponentManager::CreateInstance(kSyncStreamListenerCID, + nsnull, + NS_GET_IID(nsISyncStreamListener), + getter_AddRefs(lsnr)); + if (NS_FAILED(rv)) return rv; + rv = lsnr->Init(inStream, outStream); + if (NS_FAILED(rv)) return rv; + + *listener = lsnr; + NS_ADDREF(*listener); + return NS_OK; +} + #endif // nsNetUtil_h__ diff --git a/netwerk/base/src/nsAsyncStreamListener.cpp b/netwerk/base/src/nsAsyncStreamListener.cpp index e96e4ff4c5e6..39abeeeeb9b7 100644 --- a/netwerk/base/src/nsAsyncStreamListener.cpp +++ b/netwerk/base/src/nsAsyncStreamListener.cpp @@ -20,17 +20,14 @@ * Contributor(s): */ -#include "nsIStreamObserver.h" -#include "nsIStreamListener.h" +#include "nsAsyncStreamListener.h" #include "nsIBufferInputStream.h" #include "nsString.h" #include "nsCRT.h" -#include "nsIEventQueue.h" #include "nsIEventQueueService.h" #include "nsIIOService.h" #include "nsIServiceManager.h" #include "nsIChannel.h" -#include "nsCOMPtr.h" #include "prlog.h" static NS_DEFINE_CID(kEventQueueService, NS_EVENTQUEUESERVICE_CID); @@ -39,77 +36,6 @@ static NS_DEFINE_CID(kEventQueueService, NS_EVENTQUEUESERVICE_CID); PRLogModuleInfo* gStreamEventLog = 0; #endif -class nsAsyncStreamObserver : public nsIStreamObserver -{ -public: - NS_DECL_ISUPPORTS - - // nsIStreamObserver methods: - NS_DECL_NSISTREAMOBSERVER - - // nsAsyncStreamObserver methods: - nsAsyncStreamObserver() - : mStatus(NS_OK) - { - NS_INIT_REFCNT(); - } - - virtual ~nsAsyncStreamObserver(); - - nsresult Init(nsIStreamObserver* aObserver, nsIEventQueue* aEventQ) { - nsresult rv = NS_OK; - mReceiver = aObserver; - - NS_WITH_SERVICE(nsIEventQueueService, eventQService, kEventQueueService, &rv); - if (NS_FAILED(rv)) - return rv; - - rv = eventQService->ResolveEventQueue(aEventQ, getter_AddRefs(mEventQueue)); - return rv; - } - - nsISupports* GetReceiver() { return mReceiver.get(); } - nsresult GetStatus() { return mStatus; } - void SetStatus(nsresult value) { mStatus = value; } - -protected: - nsCOMPtr mEventQueue; - nsCOMPtr mReceiver; - nsresult mStatus; -}; - - -class nsAsyncStreamListener : public nsAsyncStreamObserver, - public nsIStreamListener -{ -public: - NS_DECL_ISUPPORTS_INHERITED - - // nsIStreamListener methods: - NS_IMETHOD OnStartRequest(nsIChannel* channel, - nsISupports* context) - { - return nsAsyncStreamObserver::OnStartRequest(channel, context); - } - - NS_IMETHOD OnStopRequest(nsIChannel* channel, - nsISupports* context, - nsresult aStatus, - const PRUnichar* aMsg) - { - return nsAsyncStreamObserver::OnStopRequest(channel, context, aStatus, aMsg); - } - - NS_IMETHOD OnDataAvailable(nsIChannel* channel, nsISupports* context, - nsIInputStream *aIStream, - PRUint32 aSourceOffset, - PRUint32 aLength); - - // nsAsyncStreamListener methods: - nsAsyncStreamListener() {} - -}; - //////////////////////////////////////////////////////////////////////////////// class nsStreamListenerEvent @@ -202,12 +128,45 @@ nsAsyncStreamObserver::~nsAsyncStreamObserver() { } -NS_IMPL_THREADSAFE_ISUPPORTS(nsAsyncStreamObserver, - NS_GET_IID(nsIStreamObserver)); +NS_IMPL_THREADSAFE_ADDREF(nsAsyncStreamObserver) +NS_IMPL_THREADSAFE_RELEASE(nsAsyncStreamObserver) +NS_IMPL_QUERY_INTERFACE2(nsAsyncStreamObserver, + nsIAsyncStreamObserver, + nsIStreamObserver) -NS_IMPL_ISUPPORTS_INHERITED(nsAsyncStreamListener, - nsAsyncStreamObserver, - nsIStreamListener); +NS_IMPL_ADDREF_INHERITED(nsAsyncStreamListener, nsAsyncStreamObserver); +NS_IMPL_RELEASE_INHERITED(nsAsyncStreamListener, nsAsyncStreamObserver); + +NS_IMETHODIMP +nsAsyncStreamListener::QueryInterface(REFNSIID aIID, void** aInstancePtr) +{ + if (!aInstancePtr) return NS_ERROR_NULL_POINTER; + if (aIID.Equals(NS_GET_IID(nsIAsyncStreamListener))) { + *aInstancePtr = NS_STATIC_CAST(nsIAsyncStreamListener*, this); + NS_ADDREF_THIS(); + return NS_OK; + } + if (aIID.Equals(NS_GET_IID(nsIStreamListener))) { + *aInstancePtr = NS_STATIC_CAST(nsIStreamListener*, this); + NS_ADDREF_THIS(); + return NS_OK; + } + return nsAsyncStreamObserver::QueryInterface(aIID, aInstancePtr); +} + +NS_IMETHODIMP +nsAsyncStreamObserver::Init(nsIStreamObserver* aObserver, nsIEventQueue* aEventQ) +{ + nsresult rv = NS_OK; + mReceiver = aObserver; + + NS_WITH_SERVICE(nsIEventQueueService, eventQService, kEventQueueService, &rv); + if (NS_FAILED(rv)) + return rv; + + rv = eventQService->ResolveEventQueue(aEventQ, getter_AddRefs(mEventQueue)); + return rv; +} //////////////////////////////////////////////////////////////////////////////// // @@ -231,7 +190,7 @@ nsOnStartRequestEvent::HandleEvent() { #if defined(PR_LOGGING) if (!gStreamEventLog) - gStreamEventLog = PR_NewLogModule("netlibStreamEvent"); + gStreamEventLog = PR_NewLogModule("netlibStreamEvent"); PR_LOG(gStreamEventLog, PR_LOG_DEBUG, ("netlibEvent: Handle Start [event=%x]", this)); #endif @@ -446,42 +405,32 @@ nsAsyncStreamListener::OnDataAvailable(nsIChannel* channel, nsISupports* context //////////////////////////////////////////////////////////////////////////////// -NS_NET nsresult -NS_NewAsyncStreamObserver(nsIStreamObserver* *result, - nsIEventQueue* eventQueue, - nsIStreamObserver* receiver) +NS_METHOD +nsAsyncStreamObserver::Create(nsISupports *aOuter, REFNSIID aIID, void **aResult) { - nsAsyncStreamObserver* l = - new nsAsyncStreamObserver(); + if (aOuter) + return NS_ERROR_NO_AGGREGATION; + nsAsyncStreamObserver* l = new nsAsyncStreamObserver(); if (l == nsnull) return NS_ERROR_OUT_OF_MEMORY; NS_ADDREF(l); - nsresult rv = l->Init(receiver, eventQueue); - if (NS_FAILED(rv)) { - NS_RELEASE(l); - return rv; - } - *result = l; - return NS_OK; + nsresult rv = l->QueryInterface(aIID, aResult); + NS_RELEASE(l); + return rv; } -NS_NET nsresult -NS_NewAsyncStreamListener(nsIStreamListener* *result, - nsIEventQueue* eventQueue, - nsIStreamListener* receiver) +NS_METHOD +nsAsyncStreamListener::Create(nsISupports *aOuter, REFNSIID aIID, void **aResult) { - nsAsyncStreamListener* l = - new nsAsyncStreamListener(); + if (aOuter) + return NS_ERROR_NO_AGGREGATION; + nsAsyncStreamListener* l = new nsAsyncStreamListener(); if (l == nsnull) return NS_ERROR_OUT_OF_MEMORY; NS_ADDREF(l); - nsresult rv = l->Init(receiver, eventQueue); - if (NS_FAILED(rv)) { - NS_RELEASE(l); - return rv; - } - *result = l; - return NS_OK; + nsresult rv = l->QueryInterface(aIID, aResult); + NS_RELEASE(l); + return rv; } //////////////////////////////////////////////////////////////////////////////// diff --git a/netwerk/base/src/nsAsyncStreamListener.h b/netwerk/base/src/nsAsyncStreamListener.h index 7714f416e1a3..be0a86de5d6d 100644 --- a/netwerk/base/src/nsAsyncStreamListener.h +++ b/netwerk/base/src/nsAsyncStreamListener.h @@ -1,19 +1,23 @@ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- * - * The contents of this file are subject to the Netscape Public License - * Version 1.0 (the "NPL"); you may not use this file except in - * compliance with the NPL. You may obtain a copy of the NPL at - * http://www.mozilla.org/NPL/ + * The contents of this file are subject to the Netscape Public + * License Version 1.1 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.mozilla.org/NPL/ * - * Software distributed under the NPL is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL - * for the specific language governing rights and limitations under the - * NPL. + * Software distributed under the License is distributed on an "AS + * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or + * implied. See the License for the specific language governing + * rights and limitations under the License. * - * The Initial Developer of this code under the NPL is Netscape + * The Original Code is mozilla.org code. + * + * The Initial Developer of the Original Code is Netscape * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998 Netscape Communications Corporation. All Rights - * Reserved. + * Copyright (C) 1998 Netscape Communications Corporation. All + * Rights Reserved. + * + * Contributor(s): */ #ifndef nsAsyncStreamListener_h__ diff --git a/netwerk/base/src/nsFileTransport.cpp b/netwerk/base/src/nsFileTransport.cpp index 00e6cc32d518..f170194d00d8 100644 --- a/netwerk/base/src/nsFileTransport.cpp +++ b/netwerk/base/src/nsFileTransport.cpp @@ -45,6 +45,7 @@ #include "nsIMIMEService.h" #include "prlog.h" #include "nsProxyObjectManager.h" +#include "nsNetUtil.h" static NS_DEFINE_CID(kMIMEServiceCID, NS_MIMESERVICE_CID); static NS_DEFINE_CID(kFileTransportServiceCID, NS_FILETRANSPORTSERVICE_CID); @@ -552,11 +553,8 @@ nsFileTransport::AsyncOpen(nsIStreamObserver *observer, nsISupports* ctxt) if (mState != CLOSED) return NS_ERROR_IN_PROGRESS; - NS_WITH_SERVICE(nsIIOService, serv, kIOServiceCID, &rv); - if (NS_FAILED(rv)) return rv; - NS_ASSERTION(observer, "need to supply an nsIStreamObserver"); - rv = serv->NewAsyncStreamObserver(observer, NS_CURRENT_EVENTQ, getter_AddRefs(mOpenObserver)); + rv = NS_NewAsyncStreamObserver(observer, NS_CURRENT_EVENTQ, getter_AddRefs(mOpenObserver)); if (NS_FAILED(rv)) return rv; NS_ASSERTION(mOpenContext == nsnull, "context not released"); @@ -590,11 +588,8 @@ nsFileTransport::AsyncRead(PRUint32 startPosition, PRInt32 readCount, || mCommand != NONE) return NS_ERROR_IN_PROGRESS; - NS_WITH_SERVICE(nsIIOService, serv, kIOServiceCID, &rv); - if (NS_FAILED(rv)) return rv; - NS_ASSERTION(listener, "need to supply an nsIStreamListener"); - rv = serv->NewAsyncStreamListener(listener, nsnull, getter_AddRefs(mListener)); + rv = NS_NewAsyncStreamListener(listener, nsnull, getter_AddRefs(mListener)); if (NS_FAILED(rv)) return rv; rv = NS_NewPipe(getter_AddRefs(mBufferInputStream), @@ -644,11 +639,8 @@ nsFileTransport::AsyncWrite(nsIInputStream *fromStream, || mCommand != NONE) return NS_ERROR_IN_PROGRESS; - NS_WITH_SERVICE(nsIIOService, serv, kIOServiceCID, &rv); - if (NS_FAILED(rv)) return rv; - if (observer) { - rv = serv->NewAsyncStreamObserver(observer, NS_CURRENT_EVENTQ, getter_AddRefs(mObserver)); + rv = NS_NewAsyncStreamObserver(observer, NS_CURRENT_EVENTQ, getter_AddRefs(mObserver)); if (NS_FAILED(rv)) return rv; } diff --git a/netwerk/base/src/nsIOService.cpp b/netwerk/base/src/nsIOService.cpp index e3933287a9fc..6976f6ac0865 100644 --- a/netwerk/base/src/nsIOService.cpp +++ b/netwerk/base/src/nsIOService.cpp @@ -336,31 +336,6 @@ nsIOService::GetUserAgent(PRUnichar* *aUserAgent) //////////////////////////////////////////////////////////////////////////////// -NS_IMETHODIMP -nsIOService::NewAsyncStreamObserver(nsIStreamObserver *receiver, nsIEventQueue *eventQueue, - nsIStreamObserver **result) -{ - return NS_NewAsyncStreamObserver(result, eventQueue, receiver); - -} - -NS_IMETHODIMP -nsIOService::NewAsyncStreamListener(nsIStreamListener *receiver, nsIEventQueue *eventQueue, - nsIStreamListener **result) -{ - return NS_NewAsyncStreamListener(result, eventQueue, receiver); - -} - -NS_IMETHODIMP -nsIOService::NewSyncStreamListener(nsIInputStream **inStream, - nsIBufferOutputStream **outStream, - nsIStreamListener **listener) -{ - return NS_NewSyncStreamListener(inStream, outStream, listener); - -} - NS_IMETHODIMP nsIOService::NewChannelFromNativePath(const char *nativePath, nsIFileChannel **result) { @@ -380,30 +355,4 @@ nsIOService::NewChannelFromNativePath(const char *nativePath, nsIFileChannel **r return NS_OK; } -NS_IMETHODIMP -nsIOService::NewInputStreamChannel(nsIURI* uri, - const char *contentType, - PRInt32 contentLength, - nsIInputStream *inStr, - nsILoadGroup *aGroup, - nsIInterfaceRequestor* notificationCallbacks, - nsLoadFlags loadAttributes, - nsIURI* originalURI, - nsIChannel **result) -{ - nsresult rv; - nsInputStreamChannel* channel; - rv = nsInputStreamChannel::Create(nsnull, NS_GET_IID(nsIChannel), - (void**)&channel); - if (NS_FAILED(rv)) return rv; - rv = channel->Init(uri, contentType, contentLength, inStr, aGroup, - notificationCallbacks, loadAttributes, originalURI); - if (NS_FAILED(rv)) { - NS_RELEASE(channel); - return rv; - } - *result = channel; - return NS_OK; -} - //////////////////////////////////////////////////////////////////////////////// diff --git a/netwerk/base/src/nsInputStreamChannel.cpp b/netwerk/base/src/nsInputStreamChannel.cpp index a98cce8b7bab..cdd7c33bd7d6 100644 --- a/netwerk/base/src/nsInputStreamChannel.cpp +++ b/netwerk/base/src/nsInputStreamChannel.cpp @@ -50,12 +50,12 @@ NS_METHOD nsInputStreamChannel::Create(nsISupports *aOuter, REFNSIID aIID, void **aResult) { - nsInputStreamChannel* about = new nsInputStreamChannel(); - if (about == nsnull) + nsInputStreamChannel* channel = new nsInputStreamChannel(); + if (channel == nsnull) return NS_ERROR_OUT_OF_MEMORY; - NS_ADDREF(about); - nsresult rv = about->QueryInterface(aIID, aResult); - NS_RELEASE(about); + NS_ADDREF(channel); + nsresult rv = channel->QueryInterface(aIID, aResult); + NS_RELEASE(channel); return rv; } @@ -98,7 +98,8 @@ nsInputStreamChannel::Init(nsIURI* uri, return NS_OK; } -NS_IMPL_ISUPPORTS4(nsInputStreamChannel, +NS_IMPL_ISUPPORTS5(nsInputStreamChannel, + nsIInputStreamChannel, nsIChannel, nsIRequest, nsIStreamObserver, diff --git a/netwerk/base/src/nsSocketTransport.cpp b/netwerk/base/src/nsSocketTransport.cpp index bf6c0aa1b06e..081488fa67c2 100644 --- a/netwerk/base/src/nsSocketTransport.cpp +++ b/netwerk/base/src/nsSocketTransport.cpp @@ -37,6 +37,7 @@ #include "nsIInterfaceRequestor.h" #include "nsProxyObjectManager.h" #include "nsXPIDLString.h" +#include "nsNetUtil.h" static NS_DEFINE_CID(kSocketProviderService, NS_SOCKETPROVIDERSERVICE_CID); static NS_DEFINE_CID(kDNSService, NS_DNSSERVICE_CID); @@ -1518,8 +1519,8 @@ nsSocketTransport::AsyncOpen(nsIStreamObserver *observer, nsISupports* ctxt) // Create a marshalling open observer to receive notifications... if (NS_SUCCEEDED(rv)) { - rv = NS_NewAsyncStreamObserver(getter_AddRefs(mOpenObserver), - NS_CURRENT_EVENTQ, observer); + rv = NS_NewAsyncStreamObserver(observer, NS_CURRENT_EVENTQ, + getter_AddRefs(mOpenObserver)); } if (NS_SUCCEEDED(rv)) { @@ -1579,8 +1580,8 @@ nsSocketTransport::AsyncRead(PRUint32 startPosition, PRInt32 readCount, // Create a marshalling stream listener to receive notifications... if (NS_SUCCEEDED(rv)) { - rv = NS_NewAsyncStreamListener(getter_AddRefs(mReadListener), - NS_CURRENT_EVENTQ, aListener); + rv = NS_NewAsyncStreamListener(aListener, NS_CURRENT_EVENTQ, + getter_AddRefs(mReadListener)); } if (NS_SUCCEEDED(rv)) { @@ -1632,8 +1633,8 @@ nsSocketTransport::AsyncWrite(nsIInputStream* aFromStream, // Create a marshalling stream observer to receive notifications... if (aObserver) { - rv = NS_NewAsyncStreamObserver(getter_AddRefs(mWriteObserver), - NS_CURRENT_EVENTQ, aObserver); + rv = NS_NewAsyncStreamObserver(aObserver, NS_CURRENT_EVENTQ, + getter_AddRefs(mWriteObserver)); } mWriteCount = writeCount; diff --git a/netwerk/base/src/nsSyncStreamListener.cpp b/netwerk/base/src/nsSyncStreamListener.cpp index 8fc7e5d6e3ac..0beda8be613e 100644 --- a/netwerk/base/src/nsSyncStreamListener.cpp +++ b/netwerk/base/src/nsSyncStreamListener.cpp @@ -20,47 +20,14 @@ * Contributor(s): */ -#include "nsIStreamListener.h" +#include "nsSyncStreamListener.h" #include "nsCRT.h" -#include "nsIBufferInputStream.h" -#include "nsIBufferOutputStream.h" #include "nsIPipe.h" //////////////////////////////////////////////////////////////////////////////// -class nsSyncStreamListener : public nsIStreamListener -{ -public: - NS_DECL_ISUPPORTS - - // nsIStreamObserver methods: - NS_DECL_NSISTREAMOBSERVER - - // nsIStreamListener methods: - NS_DECL_NSISTREAMLISTENER - - // nsSyncStreamListener methods: - nsSyncStreamListener() - : mOutputStream(nsnull) { - NS_INIT_REFCNT(); - } - virtual ~nsSyncStreamListener(); - - nsresult Init(nsIInputStream* *result); - - nsIBufferOutputStream* GetOutputStream() { return mOutputStream; } - -protected: - nsIBufferOutputStream* mOutputStream; -}; - -//////////////////////////////////////////////////////////////////////////////// - -#define NS_SYNC_STREAM_LISTENER_SEGMENT_SIZE (4 * 1024) -#define NS_SYNC_STREAM_LISTENER_BUFFER_SIZE (32 * 1024) - nsresult -nsSyncStreamListener::Init(nsIInputStream* *result) +nsSyncStreamListener::Init(nsIInputStream* *inStr, nsIBufferOutputStream* *outStr) { nsresult rv; nsIBufferInputStream* in; @@ -70,7 +37,9 @@ nsSyncStreamListener::Init(nsIInputStream* *result) NS_SYNC_STREAM_LISTENER_BUFFER_SIZE); if (NS_FAILED(rv)) return rv; - *result = in; + *inStr = in; + *outStr = mOutputStream; + NS_ADDREF(mOutputStream); return NS_OK; } @@ -79,22 +48,10 @@ nsSyncStreamListener::~nsSyncStreamListener() NS_IF_RELEASE(mOutputStream); } -NS_IMPL_ADDREF(nsSyncStreamListener); -NS_IMPL_RELEASE(nsSyncStreamListener); - -NS_IMETHODIMP -nsSyncStreamListener::QueryInterface(const nsIID& aIID, void** aInstancePtr) -{ - NS_ASSERTION(aInstancePtr, "no instance pointer"); - if (aIID.Equals(NS_GET_IID(nsIStreamListener)) || - aIID.Equals(NS_GET_IID(nsIStreamObserver)) || - aIID.Equals(NS_GET_IID(nsISupports))) { - *aInstancePtr = NS_STATIC_CAST(nsIStreamListener*, this); - NS_ADDREF_THIS(); - return NS_OK; - } - return NS_NOINTERFACE; -} +NS_IMPL_ISUPPORTS3(nsSyncStreamListener, + nsISyncStreamListener, + nsIStreamListener, + nsIStreamObserver) NS_IMETHODIMP nsSyncStreamListener::OnStartRequest(nsIChannel* channel, nsISupports* context) @@ -131,26 +88,18 @@ nsSyncStreamListener::OnDataAvailable(nsIChannel* channel, //////////////////////////////////////////////////////////////////////////////// -NS_NET nsresult -NS_NewSyncStreamListener(nsIInputStream **inStream, - nsIBufferOutputStream **outStream, - nsIStreamListener **listener) +NS_METHOD +nsSyncStreamListener::Create(nsISupports *aOuter, REFNSIID aIID, void **aResult) { + if (aOuter) + return NS_ERROR_NO_AGGREGATION; nsSyncStreamListener* l = new nsSyncStreamListener(); if (l == nsnull) return NS_ERROR_OUT_OF_MEMORY; - - nsresult rv = l->Init(inStream); - if (NS_FAILED(rv)) { - delete l; - return rv; - } - NS_ADDREF(l); - *listener = l; - *outStream = l->GetOutputStream(); - NS_ADDREF(*outStream); - return NS_OK; + nsresult rv = l->QueryInterface(aIID, aResult); + NS_RELEASE(l); + return rv; } //////////////////////////////////////////////////////////////////////////////// diff --git a/netwerk/base/src/nsUnicharStreamLoader.cpp b/netwerk/base/src/nsUnicharStreamLoader.cpp index 171bec5f756d..c54fbbf652e6 100644 --- a/netwerk/base/src/nsUnicharStreamLoader.cpp +++ b/netwerk/base/src/nsUnicharStreamLoader.cpp @@ -23,7 +23,7 @@ #include "nsUnicharStreamLoader.h" #include "nsIInputStream.h" #include "nsIURL.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsIBufferInputStream.h" #include "nsCOMPtr.h" #include "nsILoadGroup.h" @@ -66,7 +66,8 @@ nsUnicharStreamLoader::Init(nsIURI* aURL, NS_RELEASE(channel); if (NS_FAILED(rv) && mObserver) { - nsresult rv2 = mObserver->OnUnicharStreamComplete(this, rv, mData->GetUnicode()); + nsresult rv2 = mObserver->OnUnicharStreamComplete(this, rv, mData->Length(), + mData->GetUnicode()); if (NS_FAILED(rv2)) rv = rv2; // take the user's error instead } @@ -122,7 +123,8 @@ NS_IMETHODIMP nsUnicharStreamLoader::OnStopRequest(nsIChannel* channel, nsISupports *ctxt, nsresult status, const PRUnichar *errorMsg) { - nsresult rv = mObserver->OnUnicharStreamComplete(this, status, mData->GetUnicode()); + nsresult rv = mObserver->OnUnicharStreamComplete(this, status, mData->Length(), + mData->GetUnicode()); /// return mLoadGroup->RemoveChannel(channel, ctxt, status, errorMsg); return rv; } diff --git a/netwerk/build/nsNetModule.cpp b/netwerk/build/nsNetModule.cpp index 87cf2ccb68cc..c9a54da87d83 100644 --- a/netwerk/build/nsNetModule.cpp +++ b/netwerk/build/nsNetModule.cpp @@ -36,8 +36,8 @@ #include "nsLoadGroup.h" #include "nsInputStreamChannel.h" #include "nsUnicharStreamLoader.h" -//#include "nsAsyncStreamListener.h" -//#include "nsSyncStreamListener.h" +#include "nsAsyncStreamListener.h" +#include "nsSyncStreamListener.h" /////////////////////////////////////////////////////////////////////////////// // Module implementation for the net library @@ -83,7 +83,6 @@ static nsModuleComponentInfo gNetModuleInfo[] = { NS_UNICHARSTREAMLOADER_CID, "component://netscape/network/unichar-stream-loader", nsUnicharStreamLoader::Create }, -#if 0 { "Async Stream Observer", NS_ASYNCSTREAMOBSERVER_CID, "component://netscape/network/async-stream-observer", @@ -96,7 +95,6 @@ static nsModuleComponentInfo gNetModuleInfo[] = { NS_SYNCSTREAMLISTENER_CID, "component://netscape/network/sync-stream-listener", nsSyncStreamListener::Create }, -#endif { "Load Group", NS_LOADGROUP_CID, "component://netscape/network/load-group", diff --git a/netwerk/protocol/about/src/nsAboutBlank.cpp b/netwerk/protocol/about/src/nsAboutBlank.cpp index d2a218c61f49..3ba253530079 100644 --- a/netwerk/protocol/about/src/nsAboutBlank.cpp +++ b/netwerk/protocol/about/src/nsAboutBlank.cpp @@ -24,6 +24,7 @@ #include "nsIIOService.h" #include "nsIServiceManager.h" #include "nsIStringStream.h" +#include "nsNetUtil.h" static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID); @@ -42,9 +43,6 @@ nsAboutBlank::NewChannel(const char *verb, { nsresult rv; nsIChannel* channel; - NS_WITH_SERVICE(nsIIOService, serv, kIOServiceCID, &rv); - if (NS_FAILED(rv)) return rv; - nsISupports* s; rv = NS_NewStringInputStream(&s, kBlankPage); if (NS_FAILED(rv)) return rv; @@ -54,10 +52,10 @@ nsAboutBlank::NewChannel(const char *verb, NS_RELEASE(s); if (NS_FAILED(rv)) return rv; - rv = serv->NewInputStreamChannel(aURI, "text/html", - nsCRT::strlen(kBlankPage), - in, aLoadGroup, notificationCallbacks, - loadAttributes, originalURI, &channel); + rv = NS_NewInputStreamChannel(aURI, "text/html", + nsCRT::strlen(kBlankPage), + in, aLoadGroup, notificationCallbacks, + loadAttributes, originalURI, &channel); NS_RELEASE(in); if (NS_FAILED(rv)) return rv; diff --git a/netwerk/protocol/about/src/nsAboutBloat.cpp b/netwerk/protocol/about/src/nsAboutBloat.cpp index 47d533948fed..dabe93312d1a 100644 --- a/netwerk/protocol/about/src/nsAboutBloat.cpp +++ b/netwerk/protocol/about/src/nsAboutBloat.cpp @@ -30,6 +30,7 @@ #include "prtime.h" #include "nsCOMPtr.h" #include "nsIFileStream.h" +#include "nsNetUtil.h" #ifdef XP_MAC extern "C" void GC_gcollect(void); @@ -137,13 +138,10 @@ nsAboutBloat::NewChannel(const char *verb, if (NS_FAILED(rv)) return rv; } - NS_WITH_SERVICE(nsIIOService, serv, kIOServiceCID, &rv); - if (NS_FAILED(rv)) return rv; - nsIChannel* channel; - rv = serv->NewInputStreamChannel(aURI, "text/plain", - size, inStr, aLoadGroup, notificationCallbacks, - loadAttributes, originalURI, &channel); + rv = NS_NewInputStreamChannel(aURI, "text/plain", + size, inStr, aLoadGroup, notificationCallbacks, + loadAttributes, originalURI, &channel); if (NS_FAILED(rv)) return rv; *result = channel; diff --git a/netwerk/protocol/data/src/nsDataChannel.cpp b/netwerk/protocol/data/src/nsDataChannel.cpp index a77afc0fce88..1385ada6ca9f 100644 --- a/netwerk/protocol/data/src/nsDataChannel.cpp +++ b/netwerk/protocol/data/src/nsDataChannel.cpp @@ -25,7 +25,7 @@ #include "nsDataChannel.h" #include "nsIServiceManager.h" #include "nsIEventQueueService.h" -#include "nsIIOService.h" +#include "nsNetUtil.h" #include "nsILoadGroup.h" #include "plbase64.h" #include "nsIInterfaceRequestor.h" @@ -300,12 +300,9 @@ nsDataChannel::AsyncRead(PRUint32 startPosition, PRInt32 readCount, nsIEventQueue *eventQ; nsIStreamListener *listener; - NS_WITH_SERVICE(nsIIOService, serv, kIOServiceCID, &rv); - if (NS_FAILED(rv)) return rv; - // we'll just fire everything off at once because we've already got all // the data. - rv = serv->NewAsyncStreamListener(aListener, nsnull, &listener); + rv = NS_NewAsyncStreamListener(aListener, nsnull, &listener); NS_RELEASE(eventQ); if (NS_FAILED(rv)) return rv; diff --git a/netwerk/protocol/file/src/nsFileChannel.h b/netwerk/protocol/file/src/nsFileChannel.h index d0c1ccf4dd86..5084fdb1a273 100644 --- a/netwerk/protocol/file/src/nsFileChannel.h +++ b/netwerk/protocol/file/src/nsFileChannel.h @@ -86,11 +86,6 @@ protected: nsCOMPtr mLoadGroup; nsCOMPtr mOwner; nsCOMPtr mRealListener; - -#ifdef STREAM_CONVERTER_HACK - nsCOMPtr mStreamConverter; - nsCString mStreamConverterOutType; -#endif }; #endif // nsFileChannel_h__ diff --git a/netwerk/protocol/jar/src/makefile.win b/netwerk/protocol/jar/src/makefile.win index 1c993ff6c59a..367b990e227e 100644 --- a/netwerk/protocol/jar/src/makefile.win +++ b/netwerk/protocol/jar/src/makefile.win @@ -30,7 +30,6 @@ DLL=.\$(OBJDIR)\$(DLLNAME).dll LLIBS= $(LLIBS) \ $(LIBNSPR) \ $(DIST)\lib\xpcom.lib \ - $(DIST)\lib\neckoutil_s.lib \ $(DIST)\lib\plc3.lib \ $(DIST)\lib\zlib.lib \ $(NULL) diff --git a/netwerk/protocol/jar/src/nsJARChannel.cpp b/netwerk/protocol/jar/src/nsJARChannel.cpp index 9a31124a07d3..bd11eff7003f 100644 --- a/netwerk/protocol/jar/src/nsJARChannel.cpp +++ b/netwerk/protocol/jar/src/nsJARChannel.cpp @@ -17,7 +17,7 @@ * */ -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsIComponentManager.h" #include "nsIServiceManager.h" #include "nsIFileSpec.h" diff --git a/netwerk/protocol/jar/src/nsJARURI.cpp b/netwerk/protocol/jar/src/nsJARURI.cpp index 63e130ed6685..2936694af6a4 100644 --- a/netwerk/protocol/jar/src/nsJARURI.cpp +++ b/netwerk/protocol/jar/src/nsJARURI.cpp @@ -17,7 +17,7 @@ */ #include "nsJARURI.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsIIOService.h" #include "nsCRT.h" #include "nsIComponentManager.h" diff --git a/netwerk/streamconv/converters/nsFTPDirListingConv.cpp b/netwerk/streamconv/converters/nsFTPDirListingConv.cpp index 534120ab2ca5..da8579ba758c 100644 --- a/netwerk/streamconv/converters/nsFTPDirListingConv.cpp +++ b/netwerk/streamconv/converters/nsFTPDirListingConv.cpp @@ -31,7 +31,7 @@ #include "nsXPIDLString.h" #include "nsCOMPtr.h" #include "nsEscape.h" -#include "nsIIOService.h" +#include "nsNetUtil.h" #include "nsIStringStream.h" #include "nsILocaleService.h" #include "nsIComponentManager.h" @@ -232,16 +232,13 @@ nsFTPDirListingConv::AsyncConvertData(const PRUnichar *aFromType, const PRUnicha rv = aCtxt->QueryInterface(NS_GET_IID(nsIURI), (void**)&uri); if (NS_FAILED(rv)) return rv; - NS_WITH_SERVICE(nsIIOService, serv, kIOServiceCID, &rv); - if (NS_FAILED(rv)) return rv; - - rv = serv->NewInputStreamChannel(uri, "application/http-index-format", -1, // XXX fix contentLength - nsnull, // inStr - nsnull, // loadGroup - nsnull, // notificationCallbacks - nsIChannel::LOAD_NORMAL, - nsnull, // originalURI - &mPartChannel); + rv = NS_NewInputStreamChannel(uri, "application/http-index-format", -1, // XXX fix contentLength + nsnull, // inStr + nsnull, // loadGroup + nsnull, // notificationCallbacks + nsIChannel::LOAD_NORMAL, + nsnull, // originalURI + &mPartChannel); NS_RELEASE(uri); if (NS_FAILED(rv)) return rv; diff --git a/netwerk/streamconv/converters/nsMultiMixedConv.cpp b/netwerk/streamconv/converters/nsMultiMixedConv.cpp index eab6e317d256..888d69c8c011 100644 --- a/netwerk/streamconv/converters/nsMultiMixedConv.cpp +++ b/netwerk/streamconv/converters/nsMultiMixedConv.cpp @@ -29,7 +29,7 @@ #include "nsIServiceManager.h" #include "nsIGenericFactory.h" #include "nsCOMPtr.h" -#include "nsIIOService.h" +#include "nsNetUtil.h" #include "nsXPIDLString.h" static NS_DEFINE_CID(kComponentManagerCID, NS_COMPONENTMANAGER_CID); static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID); @@ -250,21 +250,15 @@ nsMultiMixedConv::OnDataAvailable(nsIChannel *channel, nsISupports *context, return rv; } - NS_WITH_SERVICE(nsIIOService, serv, kIOServiceCID, &rv); - if (NS_FAILED(rv)) { - nsAllocator::Free(buffer); - return rv; - } - if (mContentType.Length() < 1) mContentType = "text/html"; // default to text/html, that's all we'll ever see anyway - rv = serv->NewInputStreamChannel(partURI, mContentType.GetBuffer(), mContentLength, - nsnull, // inStr - nsnull, // loadGroup - nsnull, // notificationCallbacks - nsIChannel::LOAD_NORMAL, - nsnull, // originalURI - getter_AddRefs(mPartChannel)); + rv = NS_NewInputStreamChannel(partURI, mContentType.GetBuffer(), mContentLength, + nsnull, // inStr + nsnull, // loadGroup + nsnull, // notificationCallbacks + nsIChannel::LOAD_NORMAL, + nsnull, // originalURI + getter_AddRefs(mPartChannel)); if (NS_FAILED(rv)) { nsAllocator::Free(buffer); return rv; diff --git a/netwerk/streamconv/test/TestStreamConv.cpp b/netwerk/streamconv/test/TestStreamConv.cpp index db51f3d07e41..a11e3c660712 100644 --- a/netwerk/streamconv/test/TestStreamConv.cpp +++ b/netwerk/streamconv/test/TestStreamConv.cpp @@ -29,6 +29,8 @@ #include "nsIStringStream.h" #include "nsIIOService.h" #include "nsCOMPtr.h" +#include "nsNetUtil.h" + static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID); #include "nspr.h" @@ -275,14 +277,14 @@ main(int argc, char* argv[]) nsCOMPtr dummyURI; rv = serv->NewURI("http://neverneverland.com", nsnull, getter_AddRefs(dummyURI)); if (NS_FAILED(rv)) return rv; - rv = serv->NewInputStreamChannel(dummyURI, "multipart/x-mixed-replacE;boundary=thisrandomstring", - -1, // XXX fix contentLength - nsnull, // inStr - nsnull, // loadGroup - nsnull, // notificationCallbacks - nsIChannel::LOAD_NORMAL, - nsnull, // originalURI - getter_AddRefs(dummyChannel)); + rv = NS_NewInputStreamChannel(dummyURI, "multipart/x-mixed-replacE;boundary=thisrandomstring", + -1, // XXX fix contentLength + nsnull, // inStr + nsnull, // loadGroup + nsnull, // notificationCallbacks + nsIChannel::LOAD_NORMAL, + nsnull, // originalURI + getter_AddRefs(dummyChannel)); if (NS_FAILED(rv)) return rv; diff --git a/netwerk/test/Makefile.in b/netwerk/test/Makefile.in index 5aeb441e173d..ab2ed84051cf 100644 --- a/netwerk/test/Makefile.in +++ b/netwerk/test/Makefile.in @@ -48,7 +48,6 @@ endif LIBS = \ -lmozjs \ -lxpcom \ - $(MOZ_NECKO_UTIL_LIBS) \ $(LOST_SYM_LIBS) \ $(NSPR_LIBS) \ $(NULL) diff --git a/netwerk/util/public/MANIFEST b/netwerk/util/public/MANIFEST index 971074919656..abbc52b8406e 100644 --- a/netwerk/util/public/MANIFEST +++ b/netwerk/util/public/MANIFEST @@ -3,4 +3,3 @@ # nsIBlockingNotification.h -nsNeckoUtil.h diff --git a/parser/htmlparser/src/Makefile.in b/parser/htmlparser/src/Makefile.in index 209c647ffa20..37b159119130 100644 --- a/parser/htmlparser/src/Makefile.in +++ b/parser/htmlparser/src/Makefile.in @@ -109,7 +109,6 @@ EXPORTS = \ EXPORTS := $(addprefix $(srcdir)/, $(EXPORTS)) EXTRA_DSO_LDOPTS = \ - $(MOZ_NECKO_UTIL_LIBS) \ $(DIST)/lib/libexpat_s.a \ $(DIST)/lib/libxmltok_s.a \ $(NULL) diff --git a/parser/htmlparser/src/makefile.win b/parser/htmlparser/src/makefile.win index 93bba6902fef..b9fc7e23e6a6 100644 --- a/parser/htmlparser/src/makefile.win +++ b/parser/htmlparser/src/makefile.win @@ -132,11 +132,6 @@ EXPORTS= \ LINCS= -I$(PUBLIC)\xpcom \ -I$(PUBLIC)\raptor \ -!ifdef NECKO - -I$(PUBLIC)\necko \ -!else - -I$(PUBLIC)\netlib \ -!endif -I$(PUBLIC)\uconv \ -I$(PUBLIC)\expat @@ -153,12 +148,6 @@ LCFLAGS = \ LLIBS= \ $(DIST)\lib\xpcom.lib \ $(DIST)\lib\expat.lib \ -!ifdef NECKO - $(DIST)\lib\neckoutil_s.lib \ -!endif -!ifdef MOZ_PERF - $(DIST)\lib\util.lib \ -!endif $(LIBNSPR) !ifdef MOZ_NO_DEBUG_RTL diff --git a/parser/htmlparser/src/nsExpatTokenizer.cpp b/parser/htmlparser/src/nsExpatTokenizer.cpp index 494f5a009676..67f9ecd7f218 100644 --- a/parser/htmlparser/src/nsExpatTokenizer.cpp +++ b/parser/htmlparser/src/nsExpatTokenizer.cpp @@ -36,7 +36,7 @@ #include "prmem.h" #include "nsIUnicharInputStream.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsIServiceManager.h" #include "nsCOMPtr.h" #include "nsSpecialSystemDirectory.h" diff --git a/profile/pref-migrator/src/Makefile.in b/profile/pref-migrator/src/Makefile.in index 4cdbf51fa446..60c0ccd8a6f9 100644 --- a/profile/pref-migrator/src/Makefile.in +++ b/profile/pref-migrator/src/Makefile.in @@ -40,7 +40,6 @@ EXPORTS = \ $(NULL) EXTRA_DSO_LDOPTS = \ - $(MOZ_NECKO_UTIL_LIBS) \ -L$(DIST)/bin \ $(NSPR_LIBS) \ -lxpcom \ diff --git a/profile/pref-migrator/src/makefile.win b/profile/pref-migrator/src/makefile.win index b155d992920f..d171e2900f0c 100644 --- a/profile/pref-migrator/src/makefile.win +++ b/profile/pref-migrator/src/makefile.win @@ -56,11 +56,6 @@ LINCS= \ LLIBS = \ $(DIST)\lib\xpcom.lib \ -!ifndef NECKO - $(DIST)\lib\netlib.lib \ -!else - $(DIST)\lib\neckoutil_s.lib \ -!endif $(DIST)\lib\js3250.lib \ $(DIST)\lib\jsdombase_s.lib \ $(DIST)\lib\jsdomevents_s.lib \ diff --git a/profile/pref-migrator/src/nsPrefMigration.cpp b/profile/pref-migrator/src/nsPrefMigration.cpp index 2eeb31680135..6a0529b91689 100644 --- a/profile/pref-migrator/src/nsPrefMigration.cpp +++ b/profile/pref-migrator/src/nsPrefMigration.cpp @@ -46,7 +46,7 @@ #include "nsProxiedService.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" /* Network */ diff --git a/profile/src/Makefile.in b/profile/src/Makefile.in index 0786f1d33c73..9e1a2b7b022f 100644 --- a/profile/src/Makefile.in +++ b/profile/src/Makefile.in @@ -34,7 +34,6 @@ CPPSRCS = nsProfile.cpp \ $(NULL) EXTRA_DSO_LDOPTS = \ - $(MOZ_NECKO_UTIL_LIBS) \ -L$(DIST)/bin \ -lxpcom \ $(NSPR_LIBS) \ diff --git a/profile/src/makefile.win b/profile/src/makefile.win index 1ee5c56b7580..7be742c329b4 100644 --- a/profile/src/makefile.win +++ b/profile/src/makefile.win @@ -79,7 +79,6 @@ BINREL_DIST=$(XPDIST)\WIN954.0_DBG.OBJD LLIBS = \ $(LIBNSPR) \ $(DIST)\lib\xpcom.lib \ - $(DIST)\lib\neckoutil_s.lib \ $(DIST)\lib\plc3.lib \ #//------------------------------------------------------------------------ diff --git a/profile/src/nsProfile.cpp b/profile/src/nsProfile.cpp index d8e328faeb4a..e34546a2631c 100644 --- a/profile/src/nsProfile.cpp +++ b/profile/src/nsProfile.cpp @@ -46,7 +46,7 @@ #include "prprf.h" #include "nsIIOService.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsIPrefMigration.h" #include "nsPrefMigrationCIDs.h" #include "nsFileStream.h" diff --git a/rdf/base/src/nsRDFXMLDataSource.cpp b/rdf/base/src/nsRDFXMLDataSource.cpp index aae18f877c02..293e4ed06de6 100644 --- a/rdf/base/src/nsRDFXMLDataSource.cpp +++ b/rdf/base/src/nsRDFXMLDataSource.cpp @@ -82,7 +82,7 @@ #include "nsIServiceManager.h" #include "nsIStreamListener.h" #include "nsIURL.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsIChannel.h" #include "nsLayoutCID.h" // for NS_NAMESPACEMANAGER_CID. #include "nsParserCIID.h" diff --git a/rdf/base/src/rdfutil.cpp b/rdf/base/src/rdfutil.cpp index b2534288cc31..b2a8a02b93c6 100644 --- a/rdf/base/src/rdfutil.cpp +++ b/rdf/base/src/rdfutil.cpp @@ -50,7 +50,7 @@ static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID); #include "nsXPIDLString.h" #include "prtime.h" #include "rdfutil.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" //////////////////////////////////////////////////////////////////////// diff --git a/rdf/build/Makefile.in b/rdf/build/Makefile.in index f16dded2c2d6..e8bb5c452a3a 100644 --- a/rdf/build/Makefile.in +++ b/rdf/build/Makefile.in @@ -52,7 +52,6 @@ EXTRA_DSO_LDOPTS = \ $(MKSHLIB_FORCE_ALL) \ $(SHARED_LIBRARY_LIBS) \ $(MKSHLIB_UNFORCE_ALL) \ - $(MOZ_NECKO_UTIL_LIBS) \ $(MOZ_TIMER_LIBS) \ -L$(DIST)/bin \ -ljsdom \ diff --git a/rdf/build/makefile.win b/rdf/build/makefile.win index 6e80dba57f68..b13de69e4ec0 100644 --- a/rdf/build/makefile.win +++ b/rdf/build/makefile.win @@ -44,11 +44,6 @@ LLIBS=\ $(DIST)\lib\xpcom.lib \ $(DIST)\lib\gkgfxwin.lib \ $(DIST)\lib\timer_s.lib \ -!ifdef NECKO - $(DIST)\lib\neckoutil_s.lib \ -!else - $(DIST)\lib\netlib.lib \ -!endif $(DIST)\lib\jsdom.lib \ $(DIST)\lib\js3250.lib \ $(LIBNSPR) diff --git a/rdf/chrome/src/nsChromeRegistry.cpp b/rdf/chrome/src/nsChromeRegistry.cpp index ac08d32a2ba9..5d4e1fb435e4 100644 --- a/rdf/chrome/src/nsChromeRegistry.cpp +++ b/rdf/chrome/src/nsChromeRegistry.cpp @@ -39,7 +39,7 @@ #include "nsString.h" #include "nsXPIDLString.h" #include "nsISimpleEnumerator.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsFileLocations.h" #include "nsIFileLocator.h" #include "nsIDOMWindow.h" diff --git a/rdf/content/src/nsXULContentSink.cpp b/rdf/content/src/nsXULContentSink.cpp index f5cfb3e8ceaa..7adda7c51b6a 100644 --- a/rdf/content/src/nsXULContentSink.cpp +++ b/rdf/content/src/nsXULContentSink.cpp @@ -74,7 +74,7 @@ #include "nsIXULPrototypeDocument.h" #include "nsIXULPrototypeCache.h" #include "nsLayoutCID.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsRDFCID.h" #include "nsRDFParserUtils.h" #include "nsVoidArray.h" diff --git a/rdf/content/src/nsXULContentUtils.cpp b/rdf/content/src/nsXULContentUtils.cpp index f7fb35dc83e2..4f484dab68e7 100644 --- a/rdf/content/src/nsXULContentUtils.cpp +++ b/rdf/content/src/nsXULContentUtils.cpp @@ -55,7 +55,7 @@ #include "nsIXULContentUtils.h" #include "nsIXULPrototypeCache.h" #include "nsLayoutCID.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsRDFCID.h" #include "nsString.h" #include "nsXPIDLString.h" diff --git a/rdf/content/src/nsXULDocument.cpp b/rdf/content/src/nsXULDocument.cpp index 235aa166aa57..45fbf3438162 100644 --- a/rdf/content/src/nsXULDocument.cpp +++ b/rdf/content/src/nsXULDocument.cpp @@ -105,7 +105,7 @@ #include "nsIXULPrototypeCache.h" #include "nsLWBrkCIID.h" #include "nsLayoutCID.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsParserCIID.h" #include "nsRDFCID.h" #include "nsRDFDOMNodeList.h" @@ -4828,9 +4828,10 @@ nsXULDocument::LoadScript(nsXULPrototypeScript* aScriptProto, PRBool* aBlock) } -nsresult +NS_IMETHODIMP nsXULDocument::OnUnicharStreamComplete(nsIUnicharStreamLoader* aLoader, nsresult aStatus, + PRUint32 stringLen, const PRUnichar* string) { // This is the completion routine that will be called when a @@ -4854,8 +4855,7 @@ nsXULDocument::OnUnicharStreamComplete(nsIUnicharStreamLoader* aLoader, scriptProto->mSrcLoading = PR_FALSE; if (NS_SUCCEEDED(aStatus)) { - // XXXbe bug warren to provide string length from caller too - rv = scriptProto->Compile(string, nsCRT::strlen(string), + rv = scriptProto->Compile(string, stringLen, scriptProto->mSrcURI, 1, this); aStatus = rv; diff --git a/rdf/tests/rdfcat/Makefile.in b/rdf/tests/rdfcat/Makefile.in index 9bbd37f2755a..af09183583ff 100644 --- a/rdf/tests/rdfcat/Makefile.in +++ b/rdf/tests/rdfcat/Makefile.in @@ -30,7 +30,6 @@ PROGRAM = rdfcat CPPSRCS = rdfcat.cpp LIBS = \ - $(MOZ_NECKO_UTIL_LIBS) \ $(MOZ_TIMER_LIBS) \ -lmozjs \ -lxpcom \ diff --git a/rdf/tests/rdfcat/makefile.win b/rdf/tests/rdfcat/makefile.win index c431c0530e78..4dbda99f8940 100644 --- a/rdf/tests/rdfcat/makefile.win +++ b/rdf/tests/rdfcat/makefile.win @@ -37,11 +37,6 @@ OBJS= .\$(OBJDIR)\rdfcat.obj LLIBS= \ $(DIST)\lib\rdf.lib \ $(DIST)\lib\xpcom.lib \ -!ifdef NECKO - $(DIST)\lib\neckoutil_s.lib \ -!else - $(DIST)\lib\netlib.lib \ -!endif $(LIBNSPR) include <$(DEPTH)\config\rules.mak> diff --git a/rdf/tests/rdfpoll/Makefile.in b/rdf/tests/rdfpoll/Makefile.in index a3a7b2f7c822..970a376a7a11 100644 --- a/rdf/tests/rdfpoll/Makefile.in +++ b/rdf/tests/rdfpoll/Makefile.in @@ -30,7 +30,6 @@ PROGRAM = rdfpoll CPPSRCS = rdfpoll.cpp LIBS = \ - $(MOZ_NECKO_UTIL_LIBS) \ $(MOZ_TIMER_LIBS) \ -lmozjs \ -lxpcom \ diff --git a/rdf/tests/rdfpoll/makefile.win b/rdf/tests/rdfpoll/makefile.win index dde150a37f2e..9add702db0d5 100644 --- a/rdf/tests/rdfpoll/makefile.win +++ b/rdf/tests/rdfpoll/makefile.win @@ -37,11 +37,6 @@ OBJS= .\$(OBJDIR)\rdfpoll.obj LLIBS= \ $(DIST)\lib\rdf.lib \ $(DIST)\lib\xpcom.lib \ -!ifdef NECKO - $(DIST)\lib\neckoutil_s.lib \ -!else - $(DIST)\lib\netlib.lib \ -!endif $(LIBNSPR) include <$(DEPTH)\config\rules.mak> diff --git a/uriloader/base/nsDocLoader.cpp b/uriloader/base/nsDocLoader.cpp index 3682ee3ea41b..ec7eeb75ce66 100644 --- a/uriloader/base/nsDocLoader.cpp +++ b/uriloader/base/nsDocLoader.cpp @@ -38,7 +38,7 @@ #include "nsILoadGroup.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsIURL.h" #include "nsIChannel.h" #include "nsIHTTPChannel.h" @@ -309,7 +309,7 @@ nsDocLoaderImpl::Init(nsDocLoaderImpl *aParent) { nsresult rv; - rv = NS_NewLoadGroup(nsnull, this, getter_AddRefs(mLoadGroup)); + rv = NS_NewLoadGroup(this, getter_AddRefs(mLoadGroup)); if (NS_FAILED(rv)) return rv; PR_LOG(gDocLoaderLog, PR_LOG_DEBUG, diff --git a/webshell/embed/gtk/lib/GtkMozillaContainer.cpp b/webshell/embed/gtk/lib/GtkMozillaContainer.cpp index c0646e744614..9158989359a3 100644 --- a/webshell/embed/gtk/lib/GtkMozillaContainer.cpp +++ b/webshell/embed/gtk/lib/GtkMozillaContainer.cpp @@ -21,7 +21,7 @@ #include "nsIURL.h" #include "nsIIOService.h" #include "nsIServiceManager.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsFileSpec.h" #include "nsIDocumentLoader.h" #include "nsIContentViewer.h" @@ -438,10 +438,6 @@ GtkMozillaContainer::StartStream(const char *base_url, nsString url_str(base_url); nsIInputStream *istream = NULL; - NS_WITH_SERVICE(nsIIOService, serv, kIOServiceCID, &rv); - if (NS_FAILED(rv)) - goto error; - mStream = new GtkMozillaInputStream(); if (mStream == nsnull) goto error; @@ -455,16 +451,16 @@ GtkMozillaContainer::StartStream(const char *base_url, if (NS_FAILED(rv)) goto error; - rv = NS_NewLoadGroup(nsnull, nsnull, &mLoadGroup); + rv = NS_NewLoadGroup(nsnull, &mLoadGroup); if (NS_FAILED(rv)) goto error; - rv = serv->NewInputStreamChannel(url, content_type, - 1024/*len*/, istream, - mLoadGroup, - nsnull, // notificationCallbacks - nsIChannel::LOAD_NORMAL, - nsnull, &mChannel); + rv = NS_NewInputStreamChannel(url, content_type, + 1024/*len*/, istream, + mLoadGroup, + nsnull, // notificationCallbacks + nsIChannel::LOAD_NORMAL, + nsnull, &mChannel); if (NS_FAILED(rv)) goto error; diff --git a/webshell/src/Makefile.in b/webshell/src/Makefile.in index abbbaebe2a40..07c05cb19e92 100644 --- a/webshell/src/Makefile.in +++ b/webshell/src/Makefile.in @@ -37,7 +37,6 @@ CPPSRCS = \ $(NULL) EXTRA_DSO_LDOPTS = \ - $(MOZ_NECKO_UTIL_LIBS) \ $(MOZ_TIMER_LIBS) \ -L$(DIST)/bin \ -ljsdom \ diff --git a/webshell/src/makefile.win b/webshell/src/makefile.win index ec1962d68558..1e4098f77361 100644 --- a/webshell/src/makefile.win +++ b/webshell/src/makefile.win @@ -82,11 +82,6 @@ LLIBS= \ $(DIST)\lib\img32$(VERSION_NUMBER).lib \ $(DIST)\lib\util.lib \ $(DIST)\lib\jsdom.lib \ -!ifdef NECKO - $(DIST)\lib\neckoutil_s.lib \ -!else - $(DIST)\lib\netlib.lib \ -!endif $(LIBNSPR) WIN_LIBS= OLE32.LIB diff --git a/webshell/src/nsDocLoader.cpp b/webshell/src/nsDocLoader.cpp index 3682ee3ea41b..ec7eeb75ce66 100644 --- a/webshell/src/nsDocLoader.cpp +++ b/webshell/src/nsDocLoader.cpp @@ -38,7 +38,7 @@ #include "nsILoadGroup.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsIURL.h" #include "nsIChannel.h" #include "nsIHTTPChannel.h" @@ -309,7 +309,7 @@ nsDocLoaderImpl::Init(nsDocLoaderImpl *aParent) { nsresult rv; - rv = NS_NewLoadGroup(nsnull, this, getter_AddRefs(mLoadGroup)); + rv = NS_NewLoadGroup(this, getter_AddRefs(mLoadGroup)); if (NS_FAILED(rv)) return rv; PR_LOG(gDocLoaderLog, PR_LOG_DEBUG, diff --git a/webshell/src/nsWebShell.cpp b/webshell/src/nsWebShell.cpp index ce21b5b7311b..309246376350 100644 --- a/webshell/src/nsWebShell.cpp +++ b/webshell/src/nsWebShell.cpp @@ -30,7 +30,7 @@ #include "nsILinkHandler.h" #include "nsIStreamListener.h" #include "nsIPrompt.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsIProtocolHandler.h" #include "nsIDNSService.h" #include "nsIRefreshURI.h" diff --git a/webshell/tests/viewer/Makefile.in b/webshell/tests/viewer/Makefile.in index 6a81605ea819..0a3c947b7eb4 100644 --- a/webshell/tests/viewer/Makefile.in +++ b/webshell/tests/viewer/Makefile.in @@ -104,7 +104,6 @@ XP_DIST_LIBS = \ $(NULL) XP_NS_UNDERBAR_CRAP = \ - $(MOZ_NECKO_UTIL_LIBS) \ $(MOZ_TIMER_LIBS) \ $(MOZ_WIDGET_SUPPORT_LIBS) \ $(NULL) diff --git a/webshell/tests/viewer/makefile.win b/webshell/tests/viewer/makefile.win index dea32d430820..55775483b99f 100644 --- a/webshell/tests/viewer/makefile.win +++ b/webshell/tests/viewer/makefile.win @@ -95,11 +95,6 @@ LLIBS= \ $(DIST)\lib\xpcom.lib \ $(DIST)\lib\js32$(VERSION_NUMBER).lib \ $(LIBNSPR) \ -!ifdef NECKO - $(DIST)\lib\neckoutil_s.lib \ -!else - $(DIST)\lib\netlib.lib \ -!endif $(DIST)\lib\jsdom.lib \ !ifdef MOZ_FULLCIRCLE $(MOZ_TOOLS)\lib\fulls32.lib \ diff --git a/webshell/tests/viewer/nsWebCrawler.cpp b/webshell/tests/viewer/nsWebCrawler.cpp index 23c853d28be6..defac72965f3 100644 --- a/webshell/tests/viewer/nsWebCrawler.cpp +++ b/webshell/tests/viewer/nsWebCrawler.cpp @@ -34,7 +34,7 @@ #include "nsIFrame.h" #include "nsIFrameDebug.h" #include "nsIURL.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsITimer.h" #include "nsIAtom.h" #include "nsIFrameUtil.h" diff --git a/xpcom/build/nsXPComInit.cpp b/xpcom/build/nsXPComInit.cpp index e8a58c971c1b..f9b58a9b0ea8 100644 --- a/xpcom/build/nsXPComInit.cpp +++ b/xpcom/build/nsXPComInit.cpp @@ -557,8 +557,10 @@ nsresult NS_COM NS_ShutdownXPCOM(nsIServiceManager* servMgr) NS_PurgeAtomTable(); +#ifdef DEBUG nsTraceRefcnt::DumpStatistics(); nsTraceRefcnt::ResetStatistics(); +#endif #ifdef GC_LEAK_DETECTOR // Shutdown the Leak detector. diff --git a/xpcom/io/nsIFile.idl b/xpcom/io/nsIFile.idl index 945abd2d2336..c795443e8204 100644 --- a/xpcom/io/nsIFile.idl +++ b/xpcom/io/nsIFile.idl @@ -346,4 +346,6 @@ interface nsIFile : nsISupports #define NS_ERROR_FILE_COPY_OR_MOVE_FAILED NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 7) #define NS_ERROR_FILE_ALREADY_EXISTS NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 8) #define NS_ERROR_FILE_INVALID_PATH NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 9) +#define NS_ERROR_FILE_DISK_FULL NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 10) +#define NS_ERROR_FILE_CORRUPTED NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 11) %} diff --git a/xpcom/tests/CvtURL.cpp b/xpcom/tests/CvtURL.cpp index 5fd63d5461b9..9963d459f6c6 100644 --- a/xpcom/tests/CvtURL.cpp +++ b/xpcom/tests/CvtURL.cpp @@ -22,7 +22,7 @@ #include #include "nsIUnicharInputStream.h" #include "nsIURL.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsCRT.h" #include "nsString.h" #include "prprf.h" diff --git a/xpcom/tests/Makefile.in b/xpcom/tests/Makefile.in index 13dd6661a91e..fc71992789cf 100644 --- a/xpcom/tests/Makefile.in +++ b/xpcom/tests/Makefile.in @@ -64,7 +64,6 @@ CPPSRCS += \ endif LIBS += \ - $(MOZ_NECKO_UTIL_LIBS) \ $(MOZ_TIMER_LIBS) \ -lmozjs \ -lxpcom \ diff --git a/xpfe/AppCores/src/makefile.win b/xpfe/AppCores/src/makefile.win index 5ab5a04fd1ac..d098f6d1c424 100644 --- a/xpfe/AppCores/src/makefile.win +++ b/xpfe/AppCores/src/makefile.win @@ -62,11 +62,6 @@ LINCS= \ $(NULL) LLIBS = \ -!ifdef NECKO - $(DIST)\lib\neckoutil_s.lib \ -!else - $(DIST)\lib\netlib.lib \ -!endif $(DIST)\lib\xpcom.lib \ $(DIST)\lib\xppref32.lib \ $(DIST)\lib\js3250.lib \ diff --git a/xpfe/appshell/src/Makefile.in b/xpfe/appshell/src/Makefile.in index 2cfdb614207e..03d11a00a841 100644 --- a/xpfe/appshell/src/Makefile.in +++ b/xpfe/appshell/src/Makefile.in @@ -39,7 +39,6 @@ CPPSRCS = \ nsJSXPConnectFactory.cpp \ nsAppShellNameSet.cpp \ nsFileLocations.cpp \ - nsDefaultHelper.cpp \ nsNetSupportDialog.cpp \ nsWindowMediator.cpp \ nsSessionHistory.cpp \ diff --git a/xpfe/appshell/src/makefile.win b/xpfe/appshell/src/makefile.win index b77a47b39cd9..62acf1cf8969 100644 --- a/xpfe/appshell/src/makefile.win +++ b/xpfe/appshell/src/makefile.win @@ -38,7 +38,6 @@ CPPSRCS= \ nsAppShellNameSet.cpp \ nsFileLocations.cpp \ nsNetSupportDialog.cpp \ - nsDefaultHelper.cpp \ nsWindowMediator.cpp \ nsSessionHistory.cpp \ nsDialogParamBlock.cpp \ @@ -57,7 +56,6 @@ CPP_OBJS= \ .\$(OBJDIR)\nsAppShellNameSet.obj \ .\$(OBJDIR)\nsFileLocations.obj \ .\$(OBJDIR)\nsNetSupportDialog.obj \ - .\$(OBJDIR)\nsDefaultHelper.obj \ .\$(OBJDIR)\nsWindowMediator.obj \ .\$(OBJDIR)\nsSessionHistory.obj \ .\$(OBJDIR)\nsDialogParamBlock.obj \ @@ -101,11 +99,6 @@ LLIBS= \ $(DIST)\lib\xpcom.lib \ $(DIST)\lib\timer_s.lib \ $(DIST)\lib\gkgfxwin.lib \ -!ifdef NECKO - $(DIST)\lib\neckoutil_s.lib \ -!else - $(DIST)\lib\netlib.lib \ -!endif $(DIST)\lib\js3250.lib \ $(DIST)\lib\jsdombase_s.lib \ $(DIST)\lib\jsdomevents_s.lib \ diff --git a/xpfe/appshell/src/nsAppShellFactory.cpp b/xpfe/appshell/src/nsAppShellFactory.cpp index 054b24dbb37e..ebb1f4c34599 100644 --- a/xpfe/appshell/src/nsAppShellFactory.cpp +++ b/xpfe/appshell/src/nsAppShellFactory.cpp @@ -34,14 +34,11 @@ #include "nsIDialogParamBlock.h" #include "nsAbout.h" #include "nsIGenericFactory.h" + /* extern the factory entry points for each component... */ nsresult NS_NewAppShellServiceFactory(nsIFactory** aFactory); nsresult NS_NewXPConnectFactoryFactory(nsIFactory** aResult); -nsresult NS_NewDefaultProtocolHelperFactory(nsIFactory** aResult); - - - static NS_DEFINE_IID(kAppShellServiceCID, NS_APPSHELL_SERVICE_CID); static NS_DEFINE_IID(kCmdLineServiceCID, NS_COMMANDLINE_SERVICE_CID); static NS_DEFINE_IID(kProtocolHelperCID, NS_PROTOCOL_HELPER_CID); @@ -138,9 +135,6 @@ NSGetFactory(nsISupports* serviceMgr, else if (aClass.Equals(kXPConnectFactoryCID)) { rv = NS_NewXPConnectFactoryFactory(aFactory); } - else if (aClass.Equals(kProtocolHelperCID)) { - rv = NS_NewDefaultProtocolHelperFactory(aFactory); - } else if ( aClass.Equals( kNetSupportDialogCID ) ) { rv = NS_NewNetSupportDialogFactory(aFactory); diff --git a/xpfe/appshell/src/nsAppShellService.cpp b/xpfe/appshell/src/nsAppShellService.cpp index 1955a97eb7b7..9de16d420ea0 100644 --- a/xpfe/appshell/src/nsAppShellService.cpp +++ b/xpfe/appshell/src/nsAppShellService.cpp @@ -25,7 +25,7 @@ #include "nsISupportsArray.h" #include "nsIComponentManager.h" #include "nsIURL.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsIServiceManager.h" #include "nsIEventQueueService.h" #include "nsIObserverService.h" diff --git a/xpfe/appshell/src/nsDefaultHelper.cpp b/xpfe/appshell/src/nsDefaultHelper.cpp index 8018f987ca02..da44cab82a41 100644 --- a/xpfe/appshell/src/nsDefaultHelper.cpp +++ b/xpfe/appshell/src/nsDefaultHelper.cpp @@ -21,7 +21,6 @@ */ -#include "nsIBlockingNotification.h" #include "nsIURL.h" #include "nsNetSupportDialog.h" diff --git a/xpfe/appshell/src/nsNetSupportDialog.cpp b/xpfe/appshell/src/nsNetSupportDialog.cpp index 32597f8287f7..87e5dc4e6344 100644 --- a/xpfe/appshell/src/nsNetSupportDialog.cpp +++ b/xpfe/appshell/src/nsNetSupportDialog.cpp @@ -33,7 +33,7 @@ #include "nsIServiceManager.h" #include "nsAppShellCIDs.h" #include "nsIURL.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsIDOMHTMLInputElement.h" #include "nsIBrowserWindow.h" #include "nsIWebShellWindow.h" diff --git a/xpfe/appshell/src/nsWebShellWindow.cpp b/xpfe/appshell/src/nsWebShellWindow.cpp index 08d69ada1192..b610a003ba0b 100644 --- a/xpfe/appshell/src/nsWebShellWindow.cpp +++ b/xpfe/appshell/src/nsWebShellWindow.cpp @@ -380,10 +380,11 @@ nsresult nsWebShellWindow::Initialize(nsIWebShellWindow* aParent, char *tmpStr = NULL; nsAutoString urlString; - aUrl->GetSpec(&tmpStr); + rv = aUrl->GetSpec(&tmpStr); + if (NS_FAILED(rv)) return rv; urlString = tmpStr; nsCRT::free(tmpStr); - mWebShell->LoadURL(urlString.GetUnicode()); + rv = mWebShell->LoadURL(urlString.GetUnicode()); } return rv; diff --git a/xpfe/bootstrap/Makefile.in b/xpfe/bootstrap/Makefile.in index e2767d609103..b7eb08ed9dab 100644 --- a/xpfe/bootstrap/Makefile.in +++ b/xpfe/bootstrap/Makefile.in @@ -43,7 +43,6 @@ XP_DIST_LIBS = \ $(NULL) XP_NS_UNDERBAR_CRAP = \ - $(MOZ_NECKO_UTIL_LIBS) \ $(MOZ_TIMER_LIBS) \ $(NULL) diff --git a/xpfe/bootstrap/makefile.win b/xpfe/bootstrap/makefile.win index 55ce2803a811..f55a424a54a3 100644 --- a/xpfe/bootstrap/makefile.win +++ b/xpfe/bootstrap/makefile.win @@ -89,11 +89,6 @@ LLIBS= \ !ifdef GC_LEAK_DETECTOR $(DIST)\lib\boehm.lib \ !endif -!ifdef NECKO - $(DIST)\lib\neckoutil_s.lib \ -!else - $(DIST)\lib\netlib.lib \ -!endif !ifdef MOZ_FULLCIRCLE $(MOZ_TOOLS)\lib\fulls32.lib \ !endif diff --git a/xpfe/bootstrap/nsAppRunner.cpp b/xpfe/bootstrap/nsAppRunner.cpp index c6716385f39f..f6cf85a39907 100644 --- a/xpfe/bootstrap/nsAppRunner.cpp +++ b/xpfe/bootstrap/nsAppRunner.cpp @@ -22,7 +22,7 @@ #include "nsIServiceManager.h" #include "nsIComponentManager.h" #include "nsIURL.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsIWidget.h" #include "nsIBrowserWindow.h" #include "nsIWebShellWindow.h" @@ -477,10 +477,21 @@ static nsresult Ensure1Window( nsICmdLineService* cmdLineArgs) return rv; } +#ifdef DEBUG_warren +#ifdef XP_PC +#define _CRTDBG_MAP_ALLOC +#include +#endif +#endif + static nsresult main1(int argc, char* argv[]) { nsresult rv; +#ifdef DEBUG_warren +// _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_CHECK_ALWAYS_DF); +#endif + #ifndef XP_MAC // Unbuffer debug output (necessary for automated QA performance scripts). setbuf( stdout, 0 ); @@ -502,6 +513,7 @@ static nsresult main1(int argc, char* argv[]) // Initialize the cmd line service NS_WITH_SERVICE(nsICmdLineService, cmdLineArgs, kCmdLineServiceCID, &rv); + NS_ASSERTION(NS_SUCCEEDED(rv), "failed to get command line service"); if (NS_FAILED(rv)) { fprintf(stderr, "Could not obtain CmdLine processing service\n"); @@ -509,6 +521,7 @@ static nsresult main1(int argc, char* argv[]) } rv = cmdLineArgs->Initialize(argc, argv); + NS_ASSERTION(NS_SUCCEEDED(rv), "failed to initialize command line args"); if (rv == NS_ERROR_INVALID_ARG) { PrintUsage(); return rv; @@ -516,11 +529,13 @@ static nsresult main1(int argc, char* argv[]) // Create the Application Shell instance... NS_WITH_SERVICE(nsIAppShellService, appShell, kAppShellServiceCID, &rv); + NS_ASSERTION(NS_SUCCEEDED(rv), "failed to get the appshell service"); if (NS_FAILED(rv)) { return rv; } rv = appShell->Initialize( cmdLineArgs ); + NS_ASSERTION(NS_SUCCEEDED(rv), "failed to initialize appshell"); if ( NS_FAILED(rv) ) return rv; #ifdef DEBUG @@ -528,9 +543,11 @@ static nsresult main1(int argc, char* argv[]) #endif NS_WITH_SERVICE(nsIProfile, profileMgr, kProfileCID, &rv); + NS_ASSERTION(NS_SUCCEEDED(rv), "failed to get profile manager"); if ( NS_FAILED(rv) ) return rv; rv = profileMgr->StartupWithArgs(cmdLineArgs); + NS_ASSERTION(NS_SUCCEEDED(rv), "failed profile manager StartupWithArgs"); if (NS_FAILED(rv)) { return rv; } @@ -539,6 +556,7 @@ static nsresult main1(int argc, char* argv[]) // this can happen, if the user hits Cancel or Exit in the profile manager dialogs char *currentProfileStr = nsnull; rv = profileMgr->GetCurrentProfile(¤tProfileStr); + NS_ASSERTION(NS_SUCCEEDED(rv), "failed to get current profile"); if (NS_FAILED(rv) || !currentProfileStr || (PL_strlen(currentProfileStr) == 0)) { return NS_ERROR_FAILURE; } @@ -571,13 +589,15 @@ static nsresult main1(int argc, char* argv[]) // "general.startup.*" prefs // if we had no command line arguments, argc == 1. rv = DoCommandLines( cmdLineArgs, (argc == 1) ); + NS_ASSERTION(NS_SUCCEEDED(rv), "failed to process command line"); if ( NS_FAILED(rv) ) return rv; // Make sure there exists at least 1 window. - rv = Ensure1Window( cmdLineArgs ); - if (NS_FAILED(rv)) - return rv; + rv = Ensure1Window( cmdLineArgs ); + NS_ASSERTION(NS_SUCCEEDED(rv), "failed to Ensure1Window"); + if (NS_FAILED(rv)) return rv; + // Fire up the walletService NS_WITH_SERVICE(nsIWalletService, walletService, kWalletServiceCID, &rv); if ( NS_SUCCEEDED(rv) ) @@ -586,6 +606,7 @@ static nsresult main1(int argc, char* argv[]) NS_HideSplashScreen(); // Start main event loop rv = appShell->Run(); + NS_ASSERTION(NS_SUCCEEDED(rv), "failed to run appshell"); /* * Shut down the Shell instance... This is done even if the Run(...) diff --git a/xpfe/components/bookmarks/src/Makefile.in b/xpfe/components/bookmarks/src/Makefile.in index ecaf023df5b4..201d76959e4d 100644 --- a/xpfe/components/bookmarks/src/Makefile.in +++ b/xpfe/components/bookmarks/src/Makefile.in @@ -33,7 +33,6 @@ IS_COMPONENT = 1 CPPSRCS = nsBookmarksService.cpp EXTRA_DSO_LDOPTS = \ - $(MOZ_NECKO_UTIL_LIBS) \ $(MOZ_TIMER_LIBS) \ -L$(DIST)/bin \ -lxpcom \ diff --git a/xpfe/components/bookmarks/src/makefile.win b/xpfe/components/bookmarks/src/makefile.win index 56396434331f..8b13d3fae22c 100644 --- a/xpfe/components/bookmarks/src/makefile.win +++ b/xpfe/components/bookmarks/src/makefile.win @@ -44,7 +44,6 @@ LLIBS= \ $(DIST)\lib\xpcom.lib \ $(LIBNSPR) \ $(DIST)\lib\timer_s.lib \ - $(DIST)\lib\neckoutil_s.lib \ $(DIST)\lib\js3250.lib \ $(NULL) diff --git a/xpfe/components/bookmarks/src/nsBookmarksService.cpp b/xpfe/components/bookmarks/src/nsBookmarksService.cpp index d0a1591fdeeb..61cc38066ea2 100644 --- a/xpfe/components/bookmarks/src/nsBookmarksService.cpp +++ b/xpfe/components/bookmarks/src/nsBookmarksService.cpp @@ -71,7 +71,7 @@ #include "nsIAppShell.h" #include "nsIURL.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsIIOService.h" #include "nsIChannel.h" #include "nsIHTTPChannel.h" diff --git a/xpfe/components/directory/Makefile.in b/xpfe/components/directory/Makefile.in index 0bfd2ec65bde..c26dd48ce0ce 100644 --- a/xpfe/components/directory/Makefile.in +++ b/xpfe/components/directory/Makefile.in @@ -49,7 +49,6 @@ CHROME_SKIN = directory.css CHROME_L10N = ./locale/en-US/directory.dtd EXTRA_DSO_LDOPTS = \ - $(MOZ_NECKO_UTIL_LIBS) \ -L$(DIST)/bin \ -lxpcom \ $(NSPR_LIBS) \ diff --git a/xpfe/components/directory/makefile.win b/xpfe/components/directory/makefile.win index 98916663c114..59c57fb5b33d 100644 --- a/xpfe/components/directory/makefile.win +++ b/xpfe/components/directory/makefile.win @@ -66,7 +66,6 @@ LCFLAGS = \ # These are the libraries we need to link with to create the DLL LLIBS= \ $(DIST)\lib\js3250.lib \ - $(DIST)\lib\neckoutil_s.lib \ $(DIST)\lib\xpcom.lib \ $(LIBNSPR) \ $(NULL) diff --git a/xpfe/components/directory/nsDirectoryViewer.cpp b/xpfe/components/directory/nsDirectoryViewer.cpp index 61178022756c..0cbf6a66a49f 100644 --- a/xpfe/components/directory/nsDirectoryViewer.cpp +++ b/xpfe/components/directory/nsDirectoryViewer.cpp @@ -32,7 +32,7 @@ #include "jsapi.h" #include "nsCOMPtr.h" #include "nsEscape.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsIContentViewer.h" #include "nsIDocument.h" #include "nsIDocumentLoader.h" diff --git a/xpfe/components/regviewer/Makefile.in b/xpfe/components/regviewer/Makefile.in index 418a71134169..664e422c88a7 100644 --- a/xpfe/components/regviewer/Makefile.in +++ b/xpfe/components/regviewer/Makefile.in @@ -49,7 +49,6 @@ CHROME_SKIN = regviewer.css CHROME_L10N = ./locale/en-US/regviewer.dtd EXTRA_DSO_LDOPTS = \ - $(MOZ_NECKO_UTIL_LIBS) \ -L$(DIST)/bin \ -lxpcom \ $(NSPR_LIBS) \ diff --git a/xpfe/components/related/src/Makefile.in b/xpfe/components/related/src/Makefile.in index 0ade90a9f9ce..7edf42770546 100644 --- a/xpfe/components/related/src/Makefile.in +++ b/xpfe/components/related/src/Makefile.in @@ -33,7 +33,6 @@ IS_COMPONENT = 1 CPPSRCS = nsRelatedLinksHandler.cpp EXTRA_DSO_LDOPTS = \ - $(MOZ_NECKO_UTIL_LIBS) \ -L$(DIST)/bin \ -lxpcom \ $(NSPR_LIBS) \ diff --git a/xpfe/components/related/src/makefile.win b/xpfe/components/related/src/makefile.win index 9838f7464bc1..fd01781f6479 100644 --- a/xpfe/components/related/src/makefile.win +++ b/xpfe/components/related/src/makefile.win @@ -39,11 +39,6 @@ LCFLAGS = \ # These are the libraries we need to link with to create the DLL LLIBS= \ $(DIST)\lib\xpcom.lib \ -!ifdef NECKO - $(DIST)\lib\neckoutil_s.lib \ -!else - $(DIST)\lib\netlib.lib \ -!endif $(LIBNSPR) \ $(NULL) diff --git a/xpfe/components/related/src/nsRelatedLinksHandler.cpp b/xpfe/components/related/src/nsRelatedLinksHandler.cpp index bb2920336a16..457f56983595 100644 --- a/xpfe/components/related/src/nsRelatedLinksHandler.cpp +++ b/xpfe/components/related/src/nsRelatedLinksHandler.cpp @@ -40,7 +40,7 @@ #include "nsIStreamListener.h" #include "nsIURL.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsIBufferInputStream.h" #include "nsRDFCID.h" diff --git a/xpfe/components/search/src/Makefile.in b/xpfe/components/search/src/Makefile.in index bd5e7e9c716b..a9d693863508 100755 --- a/xpfe/components/search/src/Makefile.in +++ b/xpfe/components/search/src/Makefile.in @@ -37,7 +37,6 @@ CPPSRCS = \ $(NULL) EXTRA_DSO_LDOPTS = \ - $(MOZ_NECKO_UTIL_LIBS) \ -L$(DIST)/bin \ -lxpcom \ -lmozjs \ diff --git a/xpfe/components/search/src/makefile.win b/xpfe/components/search/src/makefile.win index accd5303c480..1e426b6829ba 100755 --- a/xpfe/components/search/src/makefile.win +++ b/xpfe/components/search/src/makefile.win @@ -47,7 +47,6 @@ LCFLAGS = \ LLIBS= \ $(DIST)\lib\xpcom.lib \ $(LIBNSPR) \ - $(DIST)\lib\neckoutil_s.lib \ $(DIST)\lib\js3250.lib \ $(NULL) diff --git a/xpfe/components/search/src/nsInternetSearchService.cpp b/xpfe/components/search/src/nsInternetSearchService.cpp index 1e28e25864cd..2d4fca9e6721 100755 --- a/xpfe/components/search/src/nsInternetSearchService.cpp +++ b/xpfe/components/search/src/nsInternetSearchService.cpp @@ -56,7 +56,7 @@ #include "nsEscape.h" #include "nsIURL.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsIChannel.h" #include "nsIHTTPChannel.h" #include "nsHTTPEnums.h" diff --git a/xpfe/components/xfer/src/Makefile.in b/xpfe/components/xfer/src/Makefile.in index 61427a56ab5e..263294798141 100644 --- a/xpfe/components/xfer/src/Makefile.in +++ b/xpfe/components/xfer/src/Makefile.in @@ -36,7 +36,6 @@ CPPSRCS = \ $(NULL) EXTRA_DSO_LDOPTS = \ - $(MOZ_NECKO_UTIL_LIBS) \ -L$(DIST)/bin \ -lxpcom \ -lmozjs \ diff --git a/xpfe/components/xfer/src/makefile.win b/xpfe/components/xfer/src/makefile.win index 57729bd572b8..792a16effd58 100644 --- a/xpfe/components/xfer/src/makefile.win +++ b/xpfe/components/xfer/src/makefile.win @@ -59,11 +59,6 @@ LLIBS = \ $(LIBNSPR) \ $(DIST)\lib\xpcom.lib \ $(DIST)\lib\js3250.lib \ -!ifdef NECKO - $(DIST)\lib\neckoutil_s.lib \ -!else - $(DIST)\lib\netlib.lib \ -!endif $(NULL) #//------------------------------------------------------------------------ diff --git a/xpfe/components/xfer/src/nsStreamTransfer.cpp b/xpfe/components/xfer/src/nsStreamTransfer.cpp index 2886946b7350..9ed28d07f9b7 100644 --- a/xpfe/components/xfer/src/nsStreamTransfer.cpp +++ b/xpfe/components/xfer/src/nsStreamTransfer.cpp @@ -24,7 +24,7 @@ #include "nsIAppShellComponentImpl.h" #include "nsStreamXferOp.h" #include "nsIFileSpecWithUI.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsIPref.h" #include "nsIURL.h" diff --git a/xpfe/components/xfer/src/nsStreamXferOp.cpp b/xpfe/components/xfer/src/nsStreamXferOp.cpp index 2eecbbec0155..2d6458ca2464 100644 --- a/xpfe/components/xfer/src/nsStreamXferOp.cpp +++ b/xpfe/components/xfer/src/nsStreamXferOp.cpp @@ -36,7 +36,7 @@ // For opening input/output streams. #include "nsIFileTransportService.h" #include "nsIOutputStream.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "prprf.h" diff --git a/xpinstall/src/Makefile.in b/xpinstall/src/Makefile.in index f88b90db2452..26e467cae790 100644 --- a/xpinstall/src/Makefile.in +++ b/xpinstall/src/Makefile.in @@ -67,7 +67,6 @@ CPPSRCS = \ LOCAL_INCLUDES = -I$(srcdir)/../public EXTRA_DSO_LDOPTS = \ - $(MOZ_NECKO_UTIL_LIBS) \ $(MOZ_REGISTRY_LIBS) \ -L$(DIST)/bin \ -ljsdom \ diff --git a/xpinstall/src/makefile.win b/xpinstall/src/makefile.win index 51411efa23fa..de76d9a0c3c9 100644 --- a/xpinstall/src/makefile.win +++ b/xpinstall/src/makefile.win @@ -43,11 +43,6 @@ LCFLAGS = \ LLIBS = \ $(DIST)\lib\mozreg.lib \ -!ifdef NECKO - $(DIST)\lib\neckoutil_s.lib \ -!else - $(DIST)\lib\netlib.lib \ -!endif $(DIST)\lib\xpcom.lib \ $(DIST)\lib\js3250.lib \ $(DIST)\lib\jsdombase_s.lib \ diff --git a/xpinstall/src/nsInstall.cpp b/xpinstall/src/nsInstall.cpp index c7e5690ef4ab..f99fb1268c02 100644 --- a/xpinstall/src/nsInstall.cpp +++ b/xpinstall/src/nsInstall.cpp @@ -54,7 +54,7 @@ #include "nsInstallPatch.h" #include "nsInstallUninstall.h" #include "nsInstallResources.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsProxiedService.h" #include "nsINetSupportDialogService.h" diff --git a/xpinstall/src/nsInstallProgressDialog.cpp b/xpinstall/src/nsInstallProgressDialog.cpp index fdba3aa321b2..aedfc2ab088d 100644 --- a/xpinstall/src/nsInstallProgressDialog.cpp +++ b/xpinstall/src/nsInstallProgressDialog.cpp @@ -35,7 +35,7 @@ #include "nsINameSpaceManager.h" #include "nsIContentViewer.h" #include "nsIDOMElement.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsIURL.h" #include "nsIWebShell.h" #include "nsIWebShellWindow.h" diff --git a/xpinstall/src/nsXPInstallManager.cpp b/xpinstall/src/nsXPInstallManager.cpp index 40aab6e14bd6..f9035b373d5e 100644 --- a/xpinstall/src/nsXPInstallManager.cpp +++ b/xpinstall/src/nsXPInstallManager.cpp @@ -31,7 +31,7 @@ #include "nsIURL.h" -#include "nsNeckoUtil.h" +#include "nsNetUtil.h" #include "nsIBufferInputStream.h" #include "nsIInputStream.h" #include "nsIStreamListener.h"