Firefox Developer Tools – Bugzilla@Mozilla Bug 1402394

Greetings everyone! On this blog I am discussing the entire process on fixing bug #1402394 that I have found from the list of Firefox Developer Tools

BUG #1402394: Requirements

  • Firefox Build Environment installed
  • Mercurial Installed
  • Mozilla-build Installed
  • Create Bugzilla@Muzilla Account

After successfully compiling Firefox and configuring Mercurial I know that I am ready to start working on this bug. I just want to point out that it is a must to configure mercurial so when you generate a patch  it will  include your details to Bugzilla@Mozilla. I have also included the links for the bug and the documentation that is recommended to read before starting working on this.

The Process

1. The first step is to navigate to the following directory using the windows interface and Mozilla-build start shell:

 mozilla-central\devtools\client\shared\components

2. Now its time to rename the following .js (JavaScript), .css (Cascading Style Sheet) as well as, inside the sub-directories.

To rename, the following command is used so you can see the results using the "diff" command after.

  • "hg rename example-A ExampleA" 
  • The first argument is the existing file and the second is what you would like to rename to.

3. After renaming all the files in this directory and the sub-directories it's time to edit the moz.build and change the old file names.

4. Now as I have mentioned earlier I use the "hg diff" command to see the differences between the first revision and the current one. This will list all the lines I have removed and changed. This is useful because when I will be generating the patch it will list all the changes that I have made.

5. Now I must edit all the lines that has the old file names from the parent directory Mozilla-Source. In order to save time and not go trough each folder I have open the text editor and searched the whole directory with the line that start:

  • "\devtools\client\shared\components"
  • CTRL + SHIFT + F (To search all directories)
+
Lines of code replaced
-
Lines of code removed

6. Now that every file has been renamed its time to commit (save) the changes and to generate the patch! I have used Mercurial GUI but, you can also use the MozillaBuild start-shell.

Final Thoughts

The steps above shows how simple  it is to fix the bug but, it wasn't that easy as I haven't listed all the errors I have received during the process. I have encountered multiple errors:

  • Unsorted list element - I had to change the elements order in the moz.build file.
  • UI Test Fail - happens because I haven't renamed the files in the test directory.

After fixing these errors, I have submitted multiple patches through Bugzilla@Mozilla website. The reporter Mr. Brosset was very helpful and informative with his replies. This was a great experience overall, I have learned how to properly use MozillaBuild commands and Mercurial. As well the process of what happens before the patch is ready to be submitted (Must go trough multiple testing using treeherder system etc). Below is the patch that is successfully landed.

Leave a Reply

Your email address will not be published. Required fields are marked *