Fixing NSBrowserView bustage from the nsIURI API change. Not part of the build, a=shaver.

This commit is contained in:
bryner%netscape.com 2002-03-07 03:53:50 +00:00
parent 690da19e7a
commit ac43cfc520

View File

@ -53,6 +53,7 @@
// XPCOM and String includes
#include "nsCRT.h"
#include "nsXPIDLString.h"
#include "nsString.h"
#include "nsCOMPtr.h"
@ -505,10 +506,10 @@ nsCocoaBrowserListener::OnLocationChange(nsIWebProgress *aWebProgress,
nsIRequest *aRequest,
nsIURI *location)
{
nsXPIDLCString spec;
nsCAutoString spec;
location->GetSpec(getter_Copies(spec));
if (!spec) {
location->GetAsciiSpec(spec);
if (spec.IsEmpty()) {
return NS_ERROR_FAILURE;
}
@ -769,8 +770,8 @@ nsCocoaBrowserListener::SetContainer(id <NSBrowserContainer> aContainer)
return nsnull;
}
nsXPIDLCString spec;
uri->GetSpec(getter_Copies(spec));
nsCAutoString spec;
uri->GetAsciiSpec(spec);
const char* cstr = spec.get();
NSString* str = [NSString stringWithCString:cstr];