diff --git a/mozilla/docshell/base/nsDocShell.cpp b/mozilla/docshell/base/nsDocShell.cpp index 6300738bfa3..8571dbd37bb 100644 --- a/mozilla/docshell/base/nsDocShell.cpp +++ b/mozilla/docshell/base/nsDocShell.cpp @@ -2828,7 +2828,7 @@ NS_IMETHODIMP nsDocShell::CreateFixupURI(const PRUnichar* aStringURI, uriString.Trim(" "); // Cleanup the empty spaces that might be on each end. // Just try to create an URL out of it - NS_NewURI(aURI, uriString.GetUnicode(), nsnull); + NS_NewURI(aURI, uriString, nsnull); if(*aURI) return NS_OK; @@ -2861,7 +2861,7 @@ NS_IMETHODIMP nsDocShell::CreateFixupURI(const PRUnichar* aStringURI, else uriString.InsertWithConversion("http://", 0, 7); } // end if checkprotocol - return NS_NewURI(aURI, uriString.GetUnicode(), nsnull); + return NS_NewURI(aURI, uriString, nsnull); } NS_IMETHODIMP nsDocShell::FileURIFixup(const PRUnichar* aStringURI, @@ -3460,7 +3460,7 @@ nsDocShell::OnNewURI(nsIURI *aURI, nsIChannel *aChannel, nsDocShellInfoLoadType if (!uriAttrib) { uri = baseURI; } else { - NS_NewURI(getter_AddRefs(uri), uriAttrib, baseURI); + NS_NewURI(getter_AddRefs(uri), nsAutoString(uriAttrib), baseURI); nsMemory::Free(uriAttrib); } diff --git a/mozilla/docshell/base/nsWebShell.cpp b/mozilla/docshell/base/nsWebShell.cpp index 1273dacf860..933fa926505 100644 --- a/mozilla/docshell/base/nsWebShell.cpp +++ b/mozilla/docshell/base/nsWebShell.cpp @@ -515,14 +515,14 @@ nsWebShell::GetReferrer(nsIURI **aReferrer) void nsWebShell::SetReferrer(const PRUnichar* aReferrer) { - NS_NewURI(getter_AddRefs(mReferrerURI), aReferrer, nsnull); + NS_NewURI(getter_AddRefs(mReferrerURI), nsAutoString(aReferrer), nsnull); } NS_IMETHODIMP nsWebShell::SetURL(const PRUnichar* aURL) { nsCOMPtr uri; - NS_ENSURE_SUCCESS(NS_NewURI(getter_AddRefs(uri), aURL, nsnull), + NS_ENSURE_SUCCESS(NS_NewURI(getter_AddRefs(uri), nsAutoString(aURL), nsnull), NS_ERROR_FAILURE); SetCurrentURI(uri); return NS_OK; @@ -828,7 +828,7 @@ nsWebShell::HandleLinkClickEvent(nsIContent *aContent, // and down in the load document code we'll detect this and // set the correct uri loader command nsCOMPtr uri; - NS_NewURI(getter_AddRefs(uri), aURLSpec, nsnull); + NS_NewURI(getter_AddRefs(uri), nsAutoString(aURLSpec), nsnull); nsCOMPtr owner; GetCurrentDocumentOwner(getter_AddRefs(owner)); diff --git a/mozilla/widget/src/mac/nsMenuBar.cpp b/mozilla/widget/src/mac/nsMenuBar.cpp index 3b97299239b..a7c12d9fa38 100644 --- a/mozilla/widget/src/mac/nsMenuBar.cpp +++ b/mozilla/widget/src/mac/nsMenuBar.cpp @@ -481,7 +481,7 @@ NS_METHOD nsMenuBar::AddMenu(nsIMenu * aMenu) //XXX "aboutStrName" should be less hardcoded PRUnichar *ptrv = nsnull; bundle->GetStringFromName(NS_ConvertASCIItoUCS2("aboutStrName").GetUnicode(), &ptrv); - nsAutoString label = ptrv; + nsAutoString label(ptrv); nsCRT::free(ptrv); ::AppendMenu(appleMenu, "\pa"); diff --git a/mozilla/widget/src/mac/nsMimeMapper.cpp b/mozilla/widget/src/mac/nsMimeMapper.cpp index fa16cc98f19..79381840855 100644 --- a/mozilla/widget/src/mac/nsMimeMapper.cpp +++ b/mozilla/widget/src/mac/nsMimeMapper.cpp @@ -89,7 +89,7 @@ nsMimeMapperMac :: MapMimeTypeToMacOSType ( const char* aMimeStr, PRBool inAddIf format |= ('..MZ' << 16); // stick it in the mapping list - mMappings.push_back ( MimePair(format, aMimeStr) ); + mMappings.push_back ( MimePair(format, nsCAutoString(aMimeStr)) ); } } @@ -164,7 +164,7 @@ nsMimeMapperMac :: ParseMappings ( const char* inMappings ) ResType flavor = nsnull; sscanf ( currPosition, "%ld %s ", &flavor, mimeType ); - mMappings.push_back( MimePair(flavor, mimeType) ); + mMappings.push_back( MimePair(flavor, nsCAutoString(mimeType)) ); currPosition += 10 + 2 + strlen(mimeType); // see ExportMapping() for explanation of this calculation