extending mailnews objects

Kent James kent at caspia.com
Tue Jun 8 14:51:48 UTC 2010

  On 6/8/2010 7:19 AM, David Bienvenu wrote:
> I'd like to solve the problems you're having with the inheritance 
> model, especially if they're all as trivial as the nsMsgDatabase problem.
The issues with nsMsgDatabase are fairly specific to it, and eventually 
I'll submit a core patch for that. For now I'm just keeping a set of 
patches I apply locally, and waiting until I am confident of my 
approach, and when there are no issues of reviewer overload to contend with.

Concerning inheritance versus forwarding, I'm leaning toward forwarding. 
Here's why, and please correct me if my understanding is incorrect 
(which it might well be, since I am not a linking guru, or haven't been 
one for decades).

Because a binary extension ships as a DLL, the object code for the base 
objects in inheritance gets added to my DLL, and then linked locally. 
That's bad for two reasons. First, I have a second copy of the code 
which makes my DLL larger. Second, I don't pick up minor changes to the 
base code that may occur on minor revisions to the base software unless 
my DLL is updated for each release. There are also possible subtle bugs 
if, for example, some functionality is changed in a minor update to a 
component - or the class of issues I faced in nsMsgDatabase with static 

But these are getting into my issues, and not tb-planning issues. The 
main question that I needed answered, that base component XPCOM 
components are fine in mailnews, has been answered.


More information about the tb-planning mailing list