Closed
Bug 499064
Opened 15 years ago
Closed 15 years ago
need way for pending listener to know when a db has been opened
Categories
(MailNews Core :: Database, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Thunderbird 3.0b3
People
(Reporter: Bienvenu, Assigned: Bienvenu)
References
Details
Attachments
(1 file, 2 obsolete files)
(deleted),
patch
|
Bienvenu
:
review+
standard8
:
superreview+
|
Details | Diff | Splinter Review |
Pending listeners are a handy way for listeners to deal with db's getting closed and re-opened, except that there's no way to know when the db has been opened. So I'm going to add a db change listener notification for when a pending listener becomes an actual listener.
I've also made nsMsgDBView use pending listeners, as a test case, and I believe asuth needs it anyway.
As a test, I faked out an imap uid validity roll and verified that the view gets told about the new database.
The attached patch works, but I need to clean it up a little - get rid of duplicate code, basically.
Assignee | ||
Comment 1•15 years ago
|
||
Asking asuth for review since he knows the relevant code really well, and he needs the patch...
Attachment #383844 -
Attachment is obsolete: true
Attachment #383942 -
Flags: superreview?(bugzilla)
Attachment #383942 -
Flags: review?(bugmail)
Comment 2•15 years ago
|
||
You never UnregisterPendingListener, yet the view somehow doesn't leak in the DBViewWrapper unit tests. Is it getting cycle collected?
Updated•15 years ago
|
Attachment #383942 -
Flags: review?(bugmail) → review+
Comment 3•15 years ago
|
||
Comment on attachment 383942 [details] [diff] [review]
patch for review
r=asuth with UnregisterPendingListener
Assignee | ||
Comment 4•15 years ago
|
||
good catch on the unregister pending listener...
I'm not sure why the unit test leak logs wouldn't have picked that up. We don't cycle collect.
Attachment #383942 -
Attachment is obsolete: true
Attachment #384009 -
Flags: superreview?(bugzilla)
Attachment #384009 -
Flags: review+
Attachment #383942 -
Flags: superreview?(bugzilla)
Comment 5•15 years ago
|
||
(In reply to comment #4)
> I'm not sure why the unit test leak logs wouldn't have picked that up. We don't
> cycle collect.
Yes we do: http://mxr.mozilla.org/comm-central/source/mailnews/test/resources/mailShutdown.js#34
Updated•15 years ago
|
Attachment #384009 -
Flags: superreview?(bugzilla) → superreview+
Comment 6•15 years ago
|
||
Comment on attachment 384009 [details] [diff] [review]
unregister pending listener
>+ nsCOMPtr<nsIMsgDBService> msgDBService = do_GetService(NS_MSGDB_SERVICE_CONTRACTID, &rv);
>+ NS_ENSURE_SUCCESS(rv,rv);
nit: add a space after the comma please (2 places in this patch).
sr=Standard8 with that fixed.
Assignee | ||
Comment 7•15 years ago
|
||
fix checked in, with nits addressed.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 8•15 years ago
|
||
I meant to say that the db doesn't use the cycle collector, afaik.
Target Milestone: --- → Thunderbird 3.0b3
You need to log in
before you can comment on or make changes to this bug.
Description
•