diff --git a/mozilla/docshell/base/nsDocShell.cpp b/mozilla/docshell/base/nsDocShell.cpp index b4724a6d90e..0ae958b4d4f 100644 --- a/mozilla/docshell/base/nsDocShell.cpp +++ b/mozilla/docshell/base/nsDocShell.cpp @@ -593,15 +593,17 @@ NS_IMETHODIMP nsDocShell::AddChild(nsIDocShellTreeItem *aChild) return NS_OK; // Do some docShell Specific stuff. - PRUnichar *defaultCharset=nsnull; - PRUnichar *forceCharset=nsnull; + nsXPIDLString defaultCharset; + nsXPIDLString forceCharset; NS_ENSURE_TRUE(mContentViewer, NS_ERROR_FAILURE); nsCOMPtr muDV = do_QueryInterface(mContentViewer); if(muDV) { - NS_ENSURE_SUCCESS(muDV->GetDefaultCharacterSet (&defaultCharset), NS_ERROR_FAILURE); - NS_ENSURE_SUCCESS(muDV->GetForceCharacterSet (&forceCharset), NS_ERROR_FAILURE); + NS_ENSURE_SUCCESS(muDV->GetDefaultCharacterSet(getter_Copies(defaultCharset)), + NS_ERROR_FAILURE); + NS_ENSURE_SUCCESS(muDV->GetForceCharacterSet(getter_Copies(forceCharset)), + NS_ERROR_FAILURE); } nsCOMPtr childCV; NS_ENSURE_SUCCESS(childAsDocShell->GetContentViewer(getter_AddRefs(childCV)),