diff --git a/mozilla/docshell/base/nsWebShell.cpp b/mozilla/docshell/base/nsWebShell.cpp index 39b1bcc6713..dccdb29123d 100644 --- a/mozilla/docshell/base/nsWebShell.cpp +++ b/mozilla/docshell/base/nsWebShell.cpp @@ -174,7 +174,7 @@ public: NS_IMETHOD GetChildCount(PRInt32& aResult); NS_IMETHOD AddChild(nsIWebShell* aChild); NS_IMETHOD ChildAt(PRInt32 aIndex, nsIWebShell*& aResult); - NS_IMETHOD GetName(PRUnichar** aName); + NS_IMETHOD GetName(const PRUnichar** aName); NS_IMETHOD SetName(const PRUnichar* aName); NS_IMETHOD FindChildWithName(const PRUnichar* aName, nsIWebShell*& aResult); @@ -212,11 +212,11 @@ public: NS_IMETHOD GoTo(PRInt32 aHistoryIndex); NS_IMETHOD GetHistoryLength(PRInt32& aResult); NS_IMETHOD GetHistoryIndex(PRInt32& aResult); - NS_IMETHOD GetURL(PRInt32 aHistoryIndex, PRUnichar** aURLResult); + NS_IMETHOD GetURL(PRInt32 aHistoryIndex, const PRUnichar** aURLResult); // Chrome api's NS_IMETHOD SetTitle(const PRUnichar* aTitle); - NS_IMETHOD GetTitle(PRUnichar** aResult); + NS_IMETHOD GetTitle(const PRUnichar** aResult); // nsIWebShellContainer NS_IMETHOD WillLoadURL(nsIWebShell* aShell, const PRUnichar* aURL, nsLoadType aReason); @@ -1090,7 +1090,7 @@ nsWebShell::ChildAt(PRInt32 aIndex, nsIWebShell*& aResult) } NS_IMETHODIMP -nsWebShell::GetName(PRUnichar** aName) +nsWebShell::GetName(const PRUnichar** aName) { *aName = mName; return NS_OK; @@ -1110,7 +1110,7 @@ nsWebShell::FindChildWithName(const PRUnichar* aName1, aResult = nsnull; nsString aName(aName1); - PRUnichar *childName; + const PRUnichar *childName; PRInt32 i, n = mChildren.Count(); for (i = 0; i < n; i++) { nsIWebShell* child = (nsIWebShell*) mChildren.ElementAt(i); @@ -1506,7 +1506,7 @@ nsWebShell::GetHistoryIndex(PRInt32& aResult) } NS_IMETHODIMP -nsWebShell::GetURL(PRInt32 aHistoryIndex, PRUnichar** aURLResult) +nsWebShell::GetURL(PRInt32 aHistoryIndex, const PRUnichar** aURLResult) { nsresult rv = NS_ERROR_ILLEGAL_VALUE; if ((aHistoryIndex >= 0) && @@ -1568,7 +1568,7 @@ nsWebShell::SetTitle(const PRUnichar* aTitle) } NS_IMETHODIMP -nsWebShell::GetTitle(PRUnichar** aResult) +nsWebShell::GetTitle(const PRUnichar** aResult) { *aResult = mTitle; return NS_OK; diff --git a/mozilla/webshell/public/nsIBrowserWindow.h b/mozilla/webshell/public/nsIBrowserWindow.h index 3e6f92c83cf..ddad85244cf 100644 --- a/mozilla/webshell/public/nsIBrowserWindow.h +++ b/mozilla/webshell/public/nsIBrowserWindow.h @@ -80,11 +80,11 @@ public: NS_IMETHOD SetTitle(const PRUnichar* aTitle) = 0; - NS_IMETHOD GetTitle(PRUnichar** aResult) = 0; + NS_IMETHOD GetTitle(const PRUnichar** aResult) = 0; NS_IMETHOD SetStatus(const PRUnichar* aStatus) = 0; - NS_IMETHOD GetStatus(PRUnichar** aResult) = 0; + NS_IMETHOD GetStatus(const PRUnichar** aResult) = 0; NS_IMETHOD SetProgress(PRInt32 aProgress, PRInt32 aProgressMax) = 0; diff --git a/mozilla/webshell/public/nsIWebShell.h b/mozilla/webshell/public/nsIWebShell.h index af4cd665f7e..eb1262b8dcf 100644 --- a/mozilla/webshell/public/nsIWebShell.h +++ b/mozilla/webshell/public/nsIWebShell.h @@ -237,7 +237,7 @@ public: /** * Return the name of the current WebShell. */ - NS_IMETHOD GetName(PRUnichar** aName) = 0; + NS_IMETHOD GetName(const PRUnichar** aName) = 0; /** * Set the name of the current WebShell. @@ -300,12 +300,12 @@ public: NS_IMETHOD GoTo(PRInt32 aHistoryIndex) = 0; NS_IMETHOD GetHistoryLength(PRInt32& aResult) = 0; NS_IMETHOD GetHistoryIndex(PRInt32& aResult) = 0; - NS_IMETHOD GetURL(PRInt32 aHistoryIndex, PRUnichar **aURLResult) = 0; + NS_IMETHOD GetURL(PRInt32 aHistoryIndex, const PRUnichar **aURLResult) = 0; // Chrome api's NS_IMETHOD SetTitle(const PRUnichar *aTitle) = 0; - NS_IMETHOD GetTitle(PRUnichar **aResult) = 0; + NS_IMETHOD GetTitle(const PRUnichar **aResult) = 0; // SetToolBar // SetMenuBar // SetStatusBar diff --git a/mozilla/webshell/src/nsWebShell.cpp b/mozilla/webshell/src/nsWebShell.cpp index 39b1bcc6713..dccdb29123d 100644 --- a/mozilla/webshell/src/nsWebShell.cpp +++ b/mozilla/webshell/src/nsWebShell.cpp @@ -174,7 +174,7 @@ public: NS_IMETHOD GetChildCount(PRInt32& aResult); NS_IMETHOD AddChild(nsIWebShell* aChild); NS_IMETHOD ChildAt(PRInt32 aIndex, nsIWebShell*& aResult); - NS_IMETHOD GetName(PRUnichar** aName); + NS_IMETHOD GetName(const PRUnichar** aName); NS_IMETHOD SetName(const PRUnichar* aName); NS_IMETHOD FindChildWithName(const PRUnichar* aName, nsIWebShell*& aResult); @@ -212,11 +212,11 @@ public: NS_IMETHOD GoTo(PRInt32 aHistoryIndex); NS_IMETHOD GetHistoryLength(PRInt32& aResult); NS_IMETHOD GetHistoryIndex(PRInt32& aResult); - NS_IMETHOD GetURL(PRInt32 aHistoryIndex, PRUnichar** aURLResult); + NS_IMETHOD GetURL(PRInt32 aHistoryIndex, const PRUnichar** aURLResult); // Chrome api's NS_IMETHOD SetTitle(const PRUnichar* aTitle); - NS_IMETHOD GetTitle(PRUnichar** aResult); + NS_IMETHOD GetTitle(const PRUnichar** aResult); // nsIWebShellContainer NS_IMETHOD WillLoadURL(nsIWebShell* aShell, const PRUnichar* aURL, nsLoadType aReason); @@ -1090,7 +1090,7 @@ nsWebShell::ChildAt(PRInt32 aIndex, nsIWebShell*& aResult) } NS_IMETHODIMP -nsWebShell::GetName(PRUnichar** aName) +nsWebShell::GetName(const PRUnichar** aName) { *aName = mName; return NS_OK; @@ -1110,7 +1110,7 @@ nsWebShell::FindChildWithName(const PRUnichar* aName1, aResult = nsnull; nsString aName(aName1); - PRUnichar *childName; + const PRUnichar *childName; PRInt32 i, n = mChildren.Count(); for (i = 0; i < n; i++) { nsIWebShell* child = (nsIWebShell*) mChildren.ElementAt(i); @@ -1506,7 +1506,7 @@ nsWebShell::GetHistoryIndex(PRInt32& aResult) } NS_IMETHODIMP -nsWebShell::GetURL(PRInt32 aHistoryIndex, PRUnichar** aURLResult) +nsWebShell::GetURL(PRInt32 aHistoryIndex, const PRUnichar** aURLResult) { nsresult rv = NS_ERROR_ILLEGAL_VALUE; if ((aHistoryIndex >= 0) && @@ -1568,7 +1568,7 @@ nsWebShell::SetTitle(const PRUnichar* aTitle) } NS_IMETHODIMP -nsWebShell::GetTitle(PRUnichar** aResult) +nsWebShell::GetTitle(const PRUnichar** aResult) { *aResult = mTitle; return NS_OK; diff --git a/mozilla/webshell/tests/viewer/nsBrowserWindow.cpp b/mozilla/webshell/tests/viewer/nsBrowserWindow.cpp index 86623eeece7..fd01ad864a2 100644 --- a/mozilla/webshell/tests/viewer/nsBrowserWindow.cpp +++ b/mozilla/webshell/tests/viewer/nsBrowserWindow.cpp @@ -429,7 +429,7 @@ nsBrowserWindow::DispatchMenuItem(PRInt32 aID) { PRInt32 theIndex; mWebShell->GetHistoryIndex(theIndex); - PRUnichar* theURL; + const PRUnichar* theURL; mWebShell->GetURL(theIndex,&theURL); nsAutoString theString(theURL); mApp->ViewSource(theString); @@ -1711,7 +1711,7 @@ nsBrowserWindow::SetTitle(const PRUnichar* aTitle) } NS_IMETHODIMP -nsBrowserWindow::GetTitle(PRUnichar** aResult) +nsBrowserWindow::GetTitle(const PRUnichar** aResult) { *aResult = mTitle; return NS_OK; @@ -1728,7 +1728,7 @@ nsBrowserWindow::SetStatus(const PRUnichar* aStatus) } NS_IMETHODIMP -nsBrowserWindow::GetStatus(PRUnichar** aResult) +nsBrowserWindow::GetStatus(const PRUnichar** aResult) { return NS_OK; } @@ -1849,7 +1849,7 @@ nsBrowserWindow::FindWebShellWithName(const PRUnichar* aName, nsIWebShell*& aRes nsIWebShell *ws; if (NS_OK == bw->GetWebShell(ws)) { - PRUnichar *name; + const PRUnichar *name; if (NS_OK == ws->GetName(&name)) { if (aNameStr.Equals(name)) { aResult = ws; @@ -2536,7 +2536,7 @@ nsBrowserWindow::DoEditorMode(nsIWebShell *aWebShell) static void DumpAWebShell(nsIWebShell* aShell, FILE* out, PRInt32 aIndent) { - PRUnichar *name; + const PRUnichar *name; nsAutoString str; nsIWebShell* parent; PRInt32 i, n; @@ -2826,7 +2826,7 @@ nsBrowserWindow::DoDebugSave() PRBool doSave = PR_FALSE; nsString path; - PRUnichar *urlString; + const PRUnichar *urlString; mWebShell->GetURL(0,&urlString); nsIURL* url; nsresult rv = NS_NewURL(&url, urlString); diff --git a/mozilla/webshell/tests/viewer/nsBrowserWindow.h b/mozilla/webshell/tests/viewer/nsBrowserWindow.h index 8e72af6318d..1fecf49c855 100644 --- a/mozilla/webshell/tests/viewer/nsBrowserWindow.h +++ b/mozilla/webshell/tests/viewer/nsBrowserWindow.h @@ -90,9 +90,9 @@ public: NS_IMETHOD SetChrome(PRUint32 aNewChromeMask); NS_IMETHOD GetChrome(PRUint32& aChromeMaskResult); NS_IMETHOD SetTitle(const PRUnichar* aTitle); - NS_IMETHOD GetTitle(PRUnichar** aResult); + NS_IMETHOD GetTitle(const PRUnichar** aResult); NS_IMETHOD SetStatus(const PRUnichar* aStatus); - NS_IMETHOD GetStatus(PRUnichar** aResult); + NS_IMETHOD GetStatus(const PRUnichar** aResult); NS_IMETHOD SetProgress(PRInt32 aProgress, PRInt32 aProgressMax); NS_IMETHOD GetWebShell(nsIWebShell*& aResult); diff --git a/mozilla/webshell/tests/viewer/nsXPBaseWindow.cpp b/mozilla/webshell/tests/viewer/nsXPBaseWindow.cpp index 15096590845..55298cda496 100644 --- a/mozilla/webshell/tests/viewer/nsXPBaseWindow.cpp +++ b/mozilla/webshell/tests/viewer/nsXPBaseWindow.cpp @@ -375,7 +375,7 @@ NS_IMETHODIMP nsXPBaseWindow::SetTitle(const PRUnichar* aTitle) } //--------------------------------------------------------------- -NS_IMETHODIMP nsXPBaseWindow::GetTitle(PRUnichar** aResult) +NS_IMETHODIMP nsXPBaseWindow::GetTitle(const PRUnichar** aResult) { *aResult = mTitle; return NS_OK; @@ -437,7 +437,7 @@ NS_IMETHODIMP nsXPBaseWindow::FindWebShellWithName(const PRUnichar* aName, nsIWe nsIWebShell *ws; if (NS_OK == GetWebShell(ws)) { - PRUnichar *name; + const PRUnichar *name; if (NS_OK == ws->GetName(&name)) { if (aNameStr.Equals(name)) { aResult = ws; diff --git a/mozilla/webshell/tests/viewer/nsXPBaseWindow.h b/mozilla/webshell/tests/viewer/nsXPBaseWindow.h index 4dea0bcc695..a14a4278d71 100644 --- a/mozilla/webshell/tests/viewer/nsXPBaseWindow.h +++ b/mozilla/webshell/tests/viewer/nsXPBaseWindow.h @@ -79,7 +79,7 @@ public: NS_IMETHOD SetVisible(PRBool aIsVisible); NS_IMETHOD Close(); NS_IMETHOD SetTitle(const PRUnichar* aTitle); - NS_IMETHOD GetTitle(PRUnichar** aResult); + NS_IMETHOD GetTitle(const PRUnichar** aResult); NS_IMETHOD GetWebShell(nsIWebShell*& aResult); NS_IMETHOD GetPresShell(nsIPresShell*& aPresShell); diff --git a/mozilla/webshell/tests/viewer/public/nsIXPBaseWindow.h b/mozilla/webshell/tests/viewer/public/nsIXPBaseWindow.h index ed22ad62e3e..084bf53adfe 100644 --- a/mozilla/webshell/tests/viewer/public/nsIXPBaseWindow.h +++ b/mozilla/webshell/tests/viewer/public/nsIXPBaseWindow.h @@ -120,7 +120,7 @@ public: NS_IMETHOD SetTitle(const PRUnichar* aTitle) = 0; - NS_IMETHOD GetTitle(PRUnichar** aResult) = 0; + NS_IMETHOD GetTitle(const PRUnichar** aResult) = 0; NS_IMETHOD GetWebShell(nsIWebShell*& aResult) = 0;