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
This commit is contained in:
@@ -813,8 +813,11 @@ XULContentSinkImpl::ProcessOverlay(const nsString& aHref)
|
||||
return result;
|
||||
}
|
||||
|
||||
docLoader->LoadSubDocument(aHref,
|
||||
docInfo.get());
|
||||
nsCOMPtr<nsIURI> uri;
|
||||
result = NS_NewURI(getter_AddRefs(uri), aHref, mDocumentBaseURL);
|
||||
if (NS_FAILED(result)) return result;
|
||||
|
||||
return docLoader->LoadSubDocument(uri, docInfo.get());
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user