mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-11 16:32:59 +00:00
fix for #7891. commit db after we mark a header read.
This commit is contained in:
parent
96255e3aef
commit
21c0e6686c
@ -138,6 +138,17 @@ NS_IMETHODIMP nsNewsDatabase::MarkHdrRead(nsIMsgDBHdr *msgHdr, PRBool bRead,
|
||||
// give parent class chance to update data structures
|
||||
rv = nsMsgDatabase::MarkHdrRead(msgHdr, bRead, instigator);
|
||||
|
||||
// sspitzer:
|
||||
// yes, it is expensive to commit every time here.
|
||||
//
|
||||
// if we crash (the horror!) before we commit, the user will
|
||||
// lose all there mark as read changes.
|
||||
//
|
||||
// since committing every time is expensive if we mark a
|
||||
// whole bunch of headers as read, we should commit after we are
|
||||
// done marking.
|
||||
Commit(kSessionCommit);
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user