Bug Fixing with Mozilla Thunderbird 3.0b1pre

Week 6 (Oct 6) – Bug Fixing

Lab Details

This was quite a fun lab to do. Excluding the build process, this lab did not take too long.
To be frank, the majority of my time spent doing this lab was fixing my ~/.mozconfig file. Reason being – I have never built Mozilla Thunderbird before, so some changes and learning adaptations were necessary.

mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-@CONFIG_GUESS@
ac_add_options --disable-optimize
ac_add_options --enable-debug
ac_add_options --disable static --enable-shared
ac_add_options --enable-application=mail

For this lab, I downloaded a fresh trunk build of Mozilla Thunderbird 3.0b1pre from mercurial on Ubuntu 8.04.

hg clone http://hg.mozilla.org/comm-central/ src

Upon successful build, I confirmed the bug: improper handling of email hyper linking in e-mail messages.

My next step was to submit a bug on Bugzilla addressing the issue, which can be found here Bug #6817

Taking advantage of the nice tip posted, to peek at the code posted here:

mozilla/netwerk/streamconv/converters/mozTXTToHTMLConv.cpp

Had this tip not been posted, I would have executed an MXR search for ‘hyperlink

Following that, I began to scour for the cause of this bug looking through the file and found the line, #197, with the following condition:

if (inString.FindChar('.', pos) != kNotFound)

For this function to perform properly, the line needs to be changed to:

if ((inString.FindChar('.', pos) != kNotFound) && (inString.Find("..",0)==kNotFound))

Next, it was time to create a patch with the updated changes:

hg diff -p -U 8 > patch.txt

The contents of the patch containing the solution to the problem can be found here, Bug #6817 – Patch

Lastly, I submitted my patch to my created bug on Bugzilla, asking for review from David.Humphrey.

Parts I found difficult:

  • Building Mozilla Thunderbird by altering ~/.mozconfig
  • Looking for the appropriate function found in mozTXTToHTMLConv.cpp file that deals with hyper linking.

Tips: Read the comments for the functions, they help identify the functionality of the succeeding code: //i.e. we want to linkify johndoe@foo.com but not “let’s meet @8pm”.

Links:

Cheers,
Aaron

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: