Closed
Bug 782868
Opened 12 years ago
Closed 11 years ago
nsIMsgFolderCompactor.compact should notify errors to listener.
Categories
(MailNews Core :: Backend, defect)
MailNews Core
Backend
Tracking
(Not tracked)
RESOLVED
FIXED
Thunderbird 28.0
People
(Reporter: hiro, Assigned: hiro)
References
Details
Attachments
(1 file, 2 obsolete files)
2.63 KB,
patch
|
standard8
:
review+
|
Details | Diff | Splinter Review |
To write the test for bug 674742, the test needs to know whether the compact method is successful or not.
Attachment #651973 -
Flags: review?(mbanner)
Assignee | ||
Updated•12 years ago
|
Blocks: destroys_encrypted
Assignee | ||
Updated•12 years ago
|
No longer blocks: destroys_encrypted
Assignee | ||
Comment 1•12 years ago
|
||
Mark, could you please review this first? I suppose the patch is independent how to write the test for bug 674742.
Comment 2•12 years ago
|
||
Comment on attachment 651973 [details] [diff] [review]
Fix
Review of attachment 651973 [details] [diff] [review]:
-----------------------------------------------------------------
::: mailnews/base/src/nsMsgFolderCompactor.cpp
@@ +466,5 @@
> rv = msgDBService->OpenFolderDB(m_folder, true, getter_AddRefs(m_db));
> +#ifdef DEBUG
> + // These errors are expected.
> + rv = (rv == NS_MSG_ERROR_FOLDER_SUMMARY_MISSING ||
> + rv == NS_MSG_ERROR_FOLDER_SUMMARY_OUT_OF_DATE) ? NS_OK : rv;
I don't like the way we're doing this for debug-only. That changes the rules, not just for tests, but for developers as well.
I'm thinking that we may want to have this for non-debug as well, but I'd probably want Bienvenu to chime in on that.
Attachment #651973 -
Flags: review?(mbanner) → review-
Assignee | ||
Comment 3•12 years ago
|
||
(In reply to Mark Banner (:standard8) from comment #2)
> Comment on attachment 651973 [details] [diff] [review]
> Fix
>
> Review of attachment 651973 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> ::: mailnews/base/src/nsMsgFolderCompactor.cpp
> @@ +466,5 @@
> > rv = msgDBService->OpenFolderDB(m_folder, true, getter_AddRefs(m_db));
> > +#ifdef DEBUG
> > + // These errors are expected.
> > + rv = (rv == NS_MSG_ERROR_FOLDER_SUMMARY_MISSING ||
> > + rv == NS_MSG_ERROR_FOLDER_SUMMARY_OUT_OF_DATE) ? NS_OK : rv;
>
> I don't like the way we're doing this for debug-only. That changes the
> rules, not just for tests, but for developers as well.
I agree.
You mean that we should first fix the DEBUG macro in nsMsgDBService::OpenFolderDB()?
https://mxr.mozilla.org/comm-central/source/mailnews/db/msgdb/src/nsMsgDatabase.cpp#138
Assignee | ||
Comment 4•12 years ago
|
||
I made a mistake in the previous patch. The patch causes a failure for test_folderCompact.js on release build.
Attachment #651973 -
Attachment is obsolete: true
Attachment #656768 -
Flags: review?(mbanner)
Comment 5•12 years ago
|
||
Comment on attachment 656768 [details] [diff] [review]
Fix without DEBUG macro
Review of attachment 656768 [details] [diff] [review]:
-----------------------------------------------------------------
Sorry for the delay, I think the idea is fine, but this needs an updated patch for the recent changes that we've done.
Attachment #656768 -
Flags: review?(mbanner) → feedback+
Comment 6•12 years ago
|
||
Hi Hiro. Can you revise this patch?
(In reply to Mark Banner (:standard8) from comment #5)
> Comment on attachment 656768 [details] [diff] [review]
> Fix without DEBUG macro
>
> Review of attachment 656768 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> Sorry for the delay, I think the idea is fine, but this needs an updated
> patch for the recent changes that we've done.
Assignee: nobody → hiikezoe
Assignee | ||
Comment 7•11 years ago
|
||
Attachment #656768 -
Attachment is obsolete: true
Attachment #825051 -
Flags: review?(mbanner)
Updated•11 years ago
|
Attachment #825051 -
Flags: review?(mbanner) → review+
Assignee | ||
Updated•11 years ago
|
Keywords: checkin-needed
Comment 8•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 28.0
You need to log in
before you can comment on or make changes to this bug.
Description
•