Closed Bug 1632847 Opened 1 year ago Closed 1 year ago

Port bug 1632021 to Thunderbird (Avoid QI between transaction classes)


(MailNews Core :: Backend, task, P2)


(Not tracked)

Thunderbird 77.0


(Reporter: mkmelin, Assigned: mkmelin)




(1 file)

+++ This bug was initially created as a clone of Bug #1632021 +++

Due to changes in bug 1632021

... builds are broken with
[task 2020-04-24T11:09:30.594Z] 11:09:30 ERROR - /builds/worker/checkouts/gecko/comm/mailnews/base/util/nsMsgDBFolder.cpp:1361:48: error: allocating an object of abstract class type 'nsMsgReadStateTxn'
[task 2020-04-24T11:09:30.594Z] 11:09:30 INFO - RefPtr<nsMsgReadStateTxn> readStateTxn = new nsMsgReadStateTxn();
[task 2020-04-24T11:09:30.594Z] 11:09:30 INFO - ^
[task 2020-04-24T11:09:30.594Z] 11:09:30 INFO - /builds/worker/workspace/obj-build/dist/include/nsITransaction.h:53:14: note: unimplemented pure virtual method 'GetAsEditTransactionBase' in 'nsMsgReadStateTxn'
[task 2020-04-24T11:09:30.594Z] 11:09:30 INFO - NS_IMETHOD GetAsEditTransactionBase(mozilla::EditTransactionBase * * _retval) = 0;
[task 2020-04-24T11:09:30.594Z] 11:09:30 INFO - ^
[task 2020-04-24T11:09:30.595Z] 11:09:30 INFO - 1 error generated.

Going to land this as bustage fix as it's at least building on linux. Things seem to be working, but I don't know if it's supposed to do something more than NS_ERROR_NOT_IMPLEMENTED.

Attachment #9143090 - Flags: review?(benc)
Attachment #9143090 - Flags: feedback?(masayuki)

Pushed by
Port bug 1632021 to Thunderbird (Avoid QI between transaction classes). rs=bustage-fix

Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 77.0
Comment on attachment 9143090 [details] [diff] [review]

Review of attachment 9143090 [details] [diff] [review]:

Looks fine to me.
C-C doesn't seem to derive (or refer to) `EditTransactionBase` anywhere.
Just to sanity-check: a cursory look at `nsMsgTxn` seems to indicate it's for editing various metadata/properties on messages, rather than for the message editor, right?
(I don't know much about the editing in either M-C or C-C, but it might be worth taking a look at the C-C editing and sanity-check the patterns against what editing in M-C looks like... eg maybe the message editing in C-C _should_ be making use of `EditTransactionBase` for editing operations... I really don't know :-)
Attachment #9143090 - Flags: review?(benc) → review+
Comment on attachment 9143090 [details] [diff] [review]

Ah, sorry, I didn't realize that there is another C++ implementation of `nsITransaction` in comm-central because I checked JS part mainly. This is right fix for the purpose of the method.
Attachment #9143090 - Flags: feedback?(masayuki) → feedback+

Indeed not used for editing message content, it's for things like undo delete.

You need to log in before you can comment on or make changes to this bug.