Closed Bug 1606284 Opened 5 years ago Closed 5 years ago

Remove the Mork address book code, leaving only enough to migrate existing address books


(MailNews Core :: Address Book, task)

Not set


(Not tracked)

Thunderbird 73.0


(Reporter: darktrojan, Assigned: darktrojan)




(3 files)

There's a lot of effectively dead code in the address book now. It's still possible to create a Mork address book but it will not survive the next program start-up without being migrated. This bug is about removing the dead code, leaving only the parts needed for migration.

Blocks: 1606285

Part 1/3: Remove nsAbMDBDirectory and friends. Some of these changes get destroyed in a later part anyway, but I did this in a way that each of these parts could land separately.

Attachment #9118015 - Flags: review?(mkmelin+mozilla)

Part 2/3: Remove the database announcer/listener. This is unused since we're making the database read-only.

Attachment #9118016 - Flags: review?(mkmelin+mozilla)

Part 3/3: Make the database read-only. There's some weirdness here with Mork being in a funny state at clean-up time and failing an assertion. (Seems like a bug in Mork – now there's a surprise!) I've left behind the minimum code needed to prevent that.

Attachment #9118017 - Flags: review?(mkmelin+mozilla)
Comment on attachment 9118015 [details] [diff] [review]

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

::: mailnews/addrbook/test/unit/test_uid.js
@@ -1,2 @@
> -/*
> - * Test to check that pre-existing cards are given a UID,

Hmm, should all of this file go?
Attachment #9118015 - Flags: review?(mkmelin+mozilla) → review+
Attachment #9118016 - Flags: review?(mkmelin+mozilla) → review+
Attachment #9118017 - Flags: review?(mkmelin+mozilla) → review+

(In reply to Magnus Melin [:mkmelin] from comment #4)

Hmm, should all of this file go?

Well, it was specific to Mork as it dealt with updating old contacts to ensure they are given UIDs. Everything still relevant is tested elsewhere, except creating a new contact with a specific UID. I'll move that into test_jsaddrbook.js.

Pushed by
Remove the Mork address book provider; r=mkmelin
Remove nsIAddrDBAnnouncer and nsIAddrDBListener; r=mkmelin
Remove non-needed parts of nsAddrDatabase, making it read-only; r=mkmelin

Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 73.0

[task 2019-12-31T12:24:24.534Z] 12:24:24 INFO - z:/build/build/src/comm/mailnews/addrbook/src/nsAddrDatabase.cpp(763,31): error: function declared 'stdcall' here was previously declared without calling convention
[task 2019-12-31T12:24:24.534Z] 12:24:24 INFO - NS_IMETHODIMP nsAddrDatabase::InitCardFromRow(nsIAbCard *newCard,
[task 2019-12-31T12:24:24.534Z] 12:24:24 INFO - ^
[task 2019-12-31T12:24:24.534Z] 12:24:24 INFO - z:/build/build/src/comm/mailnews/addrbook/src/nsAddrDatabase.h(79,12): note: previous declaration is here
[task 2019-12-31T12:24:24.535Z] 12:24:24 INFO - nsresult InitCardFromRow(nsIAbCard *aNewCard, nsIMdbRow *aCardRow);
[task 2019-12-31T12:24:24.535Z] 12:24:24 INFO - ^
[task 2019-12-31T12:24:24.535Z] 12:24:24 INFO - 1 error generated.

Looks like you need to remove nsresult InitCardFromRow(nsIAbCard *aNewCard, nsIMdbRow *aCardRow); from the include file.

EDIT: No, the other way around, fix the type in the C++ file.

Pushed by
Follow-up: Fix type of InitCardFromRow(). r=me DONTBUILD
Regressions: 1763021
You need to log in before you can comment on or make changes to this bug.