Bug 352666 - Crash [@ nsPrefBranch::SetComplexValue], r=dveditz, sr=bzbarsky

git-svn-id: svn://10.0.0.236/trunk@213543 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
martijn.martijn%gmail.com
2006-10-12 13:25:02 +00:00
parent b398ddbeca
commit 3147ae7d6b

View File

@@ -385,6 +385,8 @@ NS_IMETHODIMP nsPrefBranch::SetComplexValue(const char *aPrefName, const nsIID &
if (aType.Equals(NS_GET_IID(nsILocalFile))) {
nsCOMPtr<nsILocalFile> file = do_QueryInterface(aValue);
if (!file)
return NS_NOINTERFACE;
nsCAutoString descriptorString;
rv = file->GetPersistentDescriptor(descriptorString);
@@ -402,7 +404,7 @@ NS_IMETHODIMP nsPrefBranch::SetComplexValue(const char *aPrefName, const nsIID &
nsCOMPtr<nsILocalFile> file;
relFilePref->GetFile(getter_AddRefs(file));
if (!file)
return NS_ERROR_FAILURE;
return NS_NOINTERFACE;
nsCAutoString relativeToKey;
(void) relFilePref->GetRelativeToKey(relativeToKey);
@@ -459,6 +461,8 @@ NS_IMETHODIMP nsPrefBranch::SetComplexValue(const char *aPrefName, const nsIID &
// This is deprecated and you should not be using it
if (aType.Equals(NS_GET_IID(nsIFileSpec))) {
nsCOMPtr<nsIFileSpec> file = do_QueryInterface(aValue);
if (!file)
return NS_NOINTERFACE;
nsXPIDLCString descriptorString;
rv = file->GetPersistentDescriptorString(getter_Copies(descriptorString));