From c763294c702e7ebd2eed6bcd261cd6c4c0cb45bd Mon Sep 17 00:00:00 2001 From: "mscott%netscape.com" Date: Wed, 8 Sep 1999 04:00:08 +0000 Subject: [PATCH] LoadDocument and LoadSubDocument now take nsIURIs instad of unicode strings. This is part of a webshell optimization to cut down on the number of nsIURI objects which we currently create in order to run a url in the webshell. git-svn-id: svn://10.0.0.236/trunk@46295 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/rdf/datasource/src/nsXULContentSink.cpp | 7 +++++-- mozilla/webshell/public/nsIDocumentLoader.h | 12 ++---------- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/mozilla/rdf/datasource/src/nsXULContentSink.cpp b/mozilla/rdf/datasource/src/nsXULContentSink.cpp index f939a666129..ee07be2cb4b 100644 --- a/mozilla/rdf/datasource/src/nsXULContentSink.cpp +++ b/mozilla/rdf/datasource/src/nsXULContentSink.cpp @@ -813,8 +813,11 @@ XULContentSinkImpl::ProcessOverlay(const nsString& aHref) return result; } - docLoader->LoadSubDocument(aHref, - docInfo.get()); + nsCOMPtr uri; + result = NS_NewURI(getter_AddRefs(uri), aHref, mDocumentBaseURL); + if (NS_FAILED(result)) return result; + + return docLoader->LoadSubDocument(uri, docInfo.get()); return result; } diff --git a/mozilla/webshell/public/nsIDocumentLoader.h b/mozilla/webshell/public/nsIDocumentLoader.h index 92c44b04981..0a879e3778d 100644 --- a/mozilla/webshell/public/nsIDocumentLoader.h +++ b/mozilla/webshell/public/nsIDocumentLoader.h @@ -102,26 +102,18 @@ class nsIDocumentLoader : public nsISupports public: NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOCUMENTLOADER_IID) - NS_IMETHOD LoadDocument(const nsString& aURLSpec, + NS_IMETHOD LoadDocument(nsIURI * aUri, const char* aCommand, nsIContentViewerContainer* aContainer, nsIInputStream* aPostDataStream = nsnull, nsISupports* aExtraInfo = nsnull, nsIStreamObserver* anObserver = nsnull, -#ifdef NECKO nsLoadFlags aType = nsIChannel::LOAD_NORMAL, -#else - nsURLReloadType aType = nsURLReload, -#endif const PRUint32 aLocalIP = 0) = 0; - NS_IMETHOD LoadSubDocument(const nsString& aURLSpec, + NS_IMETHOD LoadSubDocument(nsIURI * aUri, nsISupports* aExtraInfo = nsnull, -#ifdef NECKO nsLoadFlags aType = nsIChannel::LOAD_NORMAL, -#else - nsURLReloadType aType = nsURLReload, -#endif const PRUint32 aLocalIP = 0) = 0; NS_IMETHOD Stop(void) = 0;