зеркало из https://github.com/mozilla/pjs.git
fix some very recent regressions caused by 379070, sr=mscott
This commit is contained in:
Родитель
ca799f9ec0
Коммит
35a891215a
|
@ -264,10 +264,9 @@ nsresult nsMsgFolderCache::OpenMDB(const nsACString& dbName, PRBool exists)
|
|||
NS_IMETHODIMP nsMsgFolderCache::Init(nsIFile *aFile)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aFile);
|
||||
nsresult rv;
|
||||
|
||||
m_cacheElements = new nsSupportsHashtable;
|
||||
NS_ENSURE_SUCCESS(rv, NS_ERROR_OUT_OF_MEMORY);
|
||||
NS_ENSURE_TRUE(m_cacheElements, NS_ERROR_OUT_OF_MEMORY);
|
||||
|
||||
PRBool exists;
|
||||
aFile->Exists(&exists);
|
||||
|
@ -275,7 +274,7 @@ NS_IMETHODIMP nsMsgFolderCache::Init(nsIFile *aFile)
|
|||
nsCAutoString dbPath;
|
||||
aFile->GetNativePath(dbPath);
|
||||
// ### evil cast until MDB supports file streams.
|
||||
rv = OpenMDB(dbPath, exists);
|
||||
nsresult rv = OpenMDB(dbPath, exists);
|
||||
// if this fails and panacea.dat exists, try blowing away the db and recreating it
|
||||
if (NS_FAILED(rv) && exists)
|
||||
{
|
||||
|
@ -291,7 +290,7 @@ NS_IMETHODIMP nsMsgFolderCache::GetCacheElement(const nsACString& pathKey, PRBoo
|
|||
nsIMsgFolderCacheElement **result)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(result);
|
||||
NS_ENSURE_TRUE(m_cacheElements, NS_ERROR_FAILURE);
|
||||
NS_ENSURE_TRUE(m_cacheElements && !pathKey.IsEmpty(), NS_ERROR_FAILURE);
|
||||
|
||||
nsCStringKey hashKey(nsCString(pathKey).get());
|
||||
*result = (nsIMsgFolderCacheElement *) m_cacheElements->Get(&hashKey);
|
||||
|
|
|
@ -130,7 +130,8 @@ NS_IMETHODIMP nsMsgFolderCacheElement::SetStringProperty(const char *propertyNam
|
|||
yarn.mYarn_Grow = NULL;
|
||||
if (m_mdbRow)
|
||||
{
|
||||
yarn.mYarn_Buf = (void *) nsCString(propertyValue).get();
|
||||
nsCString propertyVal (propertyValue);
|
||||
yarn.mYarn_Buf = (void *) propertyVal.get();
|
||||
yarn.mYarn_Size = strlen((const char *) yarn.mYarn_Buf) + 1;
|
||||
yarn.mYarn_Fill = yarn.mYarn_Size - 1;
|
||||
yarn.mYarn_Form = 0; // what to do with this? we're storing csid in the msg hdr...
|
||||
|
|
Загрузка…
Ссылка в новой задаче