Bug 539907 - Have getPref use asynchronous statements when called with an optional callback. r=myk, sr=robstrong

This commit is contained in:
Ryan Flint
2010-02-09 05:28:39 -05:00
parent 9dc9aa116f
commit badb4dd9ea
4 changed files with 120 additions and 15 deletions

View File

@@ -447,7 +447,7 @@ nsFileControlFrame::FetchLastUsedDirectory(nsIURI* aURI, nsILocalFile* aFile)
PRBool hasPref;
if (NS_SUCCEEDED(contentPrefService->HasPref(uri, prefName, &hasPref)) && hasPref) {
nsCOMPtr<nsIVariant> pref;
contentPrefService->GetPref(uri, prefName, getter_AddRefs(pref));
contentPrefService->GetPref(uri, prefName, nsnull, getter_AddRefs(pref));
nsString prefStr;
pref->GetAsAString(prefStr);
return aFile->InitWithPath(prefStr);