diff --git a/mozilla/docshell/base/nsDocShell.cpp b/mozilla/docshell/base/nsDocShell.cpp index ac20bec0221..7e58a10645e 100644 --- a/mozilla/docshell/base/nsDocShell.cpp +++ b/mozilla/docshell/base/nsDocShell.cpp @@ -359,16 +359,6 @@ NS_IMETHODIMP nsDocShell::StopLoad() } -NS_IMETHODIMP nsDocShell::GetCurrentURI(nsIURI** aURI) -{ - NS_ENSURE_ARG_POINTER(aURI); - - *aURI = mCurrentURI; - NS_IF_ADDREF(*aURI); - - return NS_OK; -} - NS_IMETHODIMP nsDocShell::GetDocLoaderObserver(nsIDocumentLoaderObserver * *aDocLoaderObserver) { @@ -1468,24 +1458,13 @@ NS_IMETHODIMP nsDocShell::GetDocument(nsIDOMDocument** aDocument) return mContentViewer->GetDOMDocument(aDocument); } - -NS_IMETHODIMP nsDocShell::GetCurrentURI(PRUnichar** aCurrentURI) + +NS_IMETHODIMP nsDocShell::GetCurrentURI(nsIURI** aURI) { - NS_ENSURE_ARG_POINTER(aCurrentURI); + NS_ENSURE_ARG_POINTER(aURI); - if(!mCurrentURI) - { - *aCurrentURI = nsnull; - return NS_OK; - } - - char* spec; - NS_ENSURE_SUCCESS(mCurrentURI->GetSpec(&spec), NS_ERROR_FAILURE); - - *aCurrentURI = NS_ConvertASCIItoUCS2(spec).ToNewUnicode(); - - if(spec) - nsCRT::free(spec); + *aURI = mCurrentURI; + NS_IF_ADDREF(*aURI); return NS_OK; } diff --git a/mozilla/docshell/base/nsIDocShell.idl b/mozilla/docshell/base/nsIDocShell.idl index d9bcdeacbf7..6618c88ace5 100644 --- a/mozilla/docshell/base/nsIDocShell.idl +++ b/mozilla/docshell/base/nsIDocShell.idl @@ -96,11 +96,6 @@ interface nsIDocShell : nsISupports */ void stopLoad(); - /* - The current URI that is loaded. - */ - readonly attribute nsIURI currentURI; - /* clients may get and set an nsIDocumentLoaderObserver, which will be notified * during loadURI, loadURIVia, and setDocument */ diff --git a/mozilla/docshell/base/nsIWebNavigation.idl b/mozilla/docshell/base/nsIWebNavigation.idl index c072ef8994f..663d55d56db 100644 --- a/mozilla/docshell/base/nsIWebNavigation.idl +++ b/mozilla/docshell/base/nsIWebNavigation.idl @@ -32,6 +32,7 @@ interface nsISHistory; interface nsISHEntry; +interface nsIURI; [scriptable, uuid(F5D9E7B0-D930-11d3-B057-00A024FFC08C)] interface nsIWebNavigation : nsISupports @@ -123,9 +124,9 @@ interface nsIWebNavigation : nsISupports readonly attribute nsIDOMDocument document; /* - Retrieves the current URI that is loaded. + The current URI that is loaded. */ - readonly attribute wstring currentURI; + readonly attribute nsIURI currentURI; /* The session history object used to store the session history for the session.