diff --git a/embedding/browser/cocoa/src/CHBrowserView.mm b/embedding/browser/cocoa/src/CHBrowserView.mm index 5256e2543048..0f75bdb1ac62 100644 --- a/embedding/browser/cocoa/src/CHBrowserView.mm +++ b/embedding/browser/cocoa/src/CHBrowserView.mm @@ -570,9 +570,8 @@ const char kDirServiceContractID[] = "@mozilla.org/file/directory_service;1"; nsAutoString urlStr; location->GetHref(urlStr); #warning fix me - nsCAutoString urlCStr; urlCStr.AssignWithConversion(urlStr); nsCOMPtr url; - nsresult rv = NS_NewURI(getter_AddRefs(url), urlCStr.get()); + nsresult rv = NS_NewURI(getter_AddRefs(url), urlStr); if (NS_FAILED(rv)) return; diff --git a/embedding/browser/powerplant/source/CWebBrowserChrome.cpp b/embedding/browser/powerplant/source/CWebBrowserChrome.cpp index 5b133fedc0cb..32715a1091c2 100644 --- a/embedding/browser/powerplant/source/CWebBrowserChrome.cpp +++ b/embedding/browser/powerplant/source/CWebBrowserChrome.cpp @@ -279,17 +279,15 @@ NS_IMETHODIMP CWebBrowserChrome::OnLocationChange(nsIWebProgress* aWebProgress, { NS_ENSURE_TRUE(mBrowserWindow, NS_OK); - char *buf = nsnull; + nsCAutoString buf; if (location) - location->GetSpec(&buf); + location->GetSpec(buf); - nsAutoString tmp; tmp.AssignWithConversion(buf); + nsAutoString tmp; + CopyUTF8toUTF16(buf, tmp); mBrowserWindow->SetLocation(tmp); - if (buf) - Recycle(buf); - return NS_OK; }