<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../assets/xml/rss.xsl" media="all"?><rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Blog-O! (Posts about thunderbird)</title><link>https://bwinton.github.io/weblog.latte.ca/</link><description></description><atom:link rel="self" href="https://bwinton.github.io/weblog.latte.ca/tags/thunderbird.xml" type="application/rss+xml"></atom:link><language>en</language><lastBuildDate>Sat, 13 Apr 2019 21:03:19 GMT</lastBuildDate><generator>Nikola (getnikola.com)</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>A long time ago, on a computer far far away…</title><link>https://bwinton.github.io/weblog.latte.ca/blake/employment/mozilla/sixyears/</link><dc:creator>Blake Winton</dc:creator><description>&lt;div&gt;&lt;p&gt;Six years ago, I started contributing to Mozilla.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://bwinton.github.io/weblog.latte.ca/blake/employment/mozilla/sixyears/"&gt;Read more…&lt;/a&gt; (4 min remaining to read)&lt;/p&gt;&lt;/div&gt;</description><category>anniversary</category><category>employment</category><category>mozilla</category><category>thunderbird</category><guid>https://bwinton.github.io/weblog.latte.ca/blake/employment/mozilla/sixyears/</guid><pubDate>Fri, 27 Feb 2015 19:04:00 GMT</pubDate></item><item><title>Building Thunderbird on OS X Lion (10.7) and XCode 4.2</title><link>https://bwinton.github.io/weblog.latte.ca/blake/tech/thunderbird/buildingonlion/</link><dc:creator>Blake Winton</dc:creator><description>&lt;div&gt;&lt;p&gt;A few people recently asked me about building Thunderbird on the latest version
of Mac OS X.  Since I have it working, and to give myself a place to point to
the next time they ask, I figured it would be a good idea to blog about it.&lt;/p&gt;
&lt;p&gt;So, here’s my &lt;code&gt;.mozconfig&lt;/code&gt;.&lt;/p&gt;
&lt;table class="codehilitetable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt; 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;pre class="code literal-block"&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="c1"&gt;# Debug .mozconfig&lt;/span&gt;
mk_add_options &lt;span class="nv"&gt;MOZ_MAKE_FLAGS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;-j4
mk_add_options &lt;span class="nv"&gt;MOZ_OBJDIR&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;@TOPSRCDIR@/../objdir-&lt;span class="sb"&gt;`&lt;/span&gt;basename &lt;span class="se"&gt;\`&lt;/span&gt;pwd&lt;span class="se"&gt;\`&lt;/span&gt;&lt;span class="sb"&gt;`&lt;/span&gt;-&lt;span class="sb"&gt;`&lt;/span&gt;hg branch&lt;span class="sb"&gt;`&lt;/span&gt;
&lt;span class="c1"&gt;# mk_add_options AUTOCONF=autoconf213&lt;/span&gt;
ac_add_options --enable-application&lt;span class="o"&gt;=&lt;/span&gt;mail
ac_add_options --enable-extensions&lt;span class="o"&gt;=&lt;/span&gt;default,inspector
ac_add_options --enable-inspector-apis

&lt;span class="c1"&gt;# Compilation options&lt;/span&gt;
ac_add_options --disable-optimize
ac_add_options --enable-debug
ac_add_options --enable-tests
ac_add_options --disable-jemalloc
&lt;span class="c1"&gt;#ac_add_options --enable-trace-malloc&lt;/span&gt;
ac_add_options --enable-chrome-format&lt;span class="o"&gt;=&lt;/span&gt;symlink

ac_add_options --with-macos-sdk&lt;span class="o"&gt;=&lt;/span&gt;/Developer/SDKs/MacOSX10.7.sdk
ac_add_options --enable-macos-target&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;10&lt;/span&gt;.7

&lt;span class="c1"&gt;# For NSS symbols&lt;/span&gt;
&lt;span class="nb"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;MOZ_DEBUG_SYMBOLS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;
&lt;span class="c1"&gt;#ac_add_options --enable-debug-symbols="-gdwarf-2"&lt;/span&gt;

&lt;span class="c1"&gt;#Use ccache&lt;/span&gt;
&lt;span class="c1"&gt;#ac_add_options --with-ccache=/usr/local/bin/ccache&lt;/span&gt;

&lt;span class="c1"&gt;# We don't have GCC anymore, since XCode 4.2, so use clang instead.&lt;/span&gt;
&lt;span class="nv"&gt;CC&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;clang
&lt;span class="nv"&gt;CXX&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;clang++
&lt;/pre&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;

&lt;p&gt;There are probably a bunch of things I don’t really need in there, so if anyone
wants to take it, and cut it down to the minimal set, I would definitely
appreciate it.  But in the meantime, this works for me, and will probably work
for you, too.&lt;/p&gt;&lt;/div&gt;</description><category>mac</category><category>mozilla</category><category>thunderbird</category><guid>https://bwinton.github.io/weblog.latte.ca/blake/tech/thunderbird/buildingonlion/</guid><pubDate>Tue, 06 Mar 2012 15:34:10 GMT</pubDate></item><item><title>Thunderbird’s UI Directions.</title><link>https://bwinton.github.io/weblog.latte.ca/blake/tech/thunderbird/uifutures/</link><dc:creator>Blake Winton</dc:creator><description>&lt;div&gt;&lt;p&gt;&lt;link rel="stylesheet" type="text/css" href="https://bwinton.github.io/weblog.latte.ca/blake/tech/thunderbird/uifutures/bugzilla.css"&gt;
&lt;script type="text/javascript" src="https://bwinton.github.io/weblog.latte.ca/blake/tech/thunderbird/uifutures/bugzilla.js"&gt;&lt;/script&gt;&lt;/p&gt;
&lt;p&gt;On a &lt;a href="http://breakingtheegg.tumblr.com/post/10525122364/cooking-up-some-tabs-on-top-for-thunderbird"&gt;previous post&lt;/a&gt; in a different blog, some commenters were asking us if we were
considering doing things that we have planned to do for a while now, and
that led me to realize that I haven’t been communicating the future of
Thunderbird’s UI nearly well enough.  I mainly blame it on my trying to do
too many other things, and thus failing to cover all the bases.  So, having
said all that, here is the list of things, in no particular order, that I
would like to see worked on in the next few versions of Thunderbird.  But
first, I’ld like to say a little bit about why I want them.&lt;/p&gt;
&lt;p&gt;I recently heard about someone who said “Thunderbird looks like iTunes”,
and while that’s rather complimentary given the amount of time Apple puts
into making things look good, it doesn’t really lead me to believe that
people can pick our product out of a screenshot.  And so one of the overall
goals is to make Thunderbird iconic.  You can always tell when a screenshot
is of Apple mail, based on the layout and the lack of colour, and Firefox
is similarly immediately recognizable because of the big circular back
button and smaller rectangular forward button.  Similarly, I’m hoping to
have Thunderbird look different to other apps, while still fitting in on
the platform, and maintaining a little consistency with Firefox.  Of
course, that’s not the only goal, nor even the main goal.  My main idea for
Thunderbird is to let you focus on the content that’s important to you, and
not be distracted by things you don’t care about.  Hopefully most of the
changes I talk about here will help that, and as a side benefit also help
to give us a more unique style.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;A simple thing that will make the product nicer to use is just to line
  things up.  We’re all over the place, and it should be fairly simple to
  make this better.  There are a couple of bugs that are related to this,
  and I suspect we could file a few more for various other parts.
  &lt;/p&gt;&lt;div id="bug-667235"&gt;&lt;/div&gt;
  &lt;div id="bug-689543"&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;We want to put the tabs on top, because they let us put the compose and
  address book into tabs, while still having the appropriate toolbars.  (As
  well, having everything be a tab makes the application more consistent,
  as described in the next point.)
  &lt;/p&gt;&lt;div id="bug-644169"&gt;&lt;/div&gt;
  &lt;div id="bug-449299"&gt;&lt;/div&gt;
  &lt;div id="bug-457270"&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;This leads into removing the standalone Compose and Address Book windows.
  You’ll still be able to open a window for those functions, but it will
  just be a regular window with a Compose or Address Book tab.  (No bugs
  for this yet.  Removals are sensitive things, and we want to get the
  replacement UI working well before we remove the existing UI.)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;We really want the Thunderbird button, so that we can hide the menus, and
  have less Glass on Windows, and make the most common actions easier to
  find and use.
  &lt;/p&gt;&lt;div id="bug-650170"&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;But, to add that button, we first need to see what the most common menu
  items people use are, therefore we need Test Pilot.
  &lt;/p&gt;&lt;div id="bug-679513"&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;We would like to add a HomeTab, to give people a personalized place to
  land when they start Thunderbird, or open a new window.
  &lt;/p&gt;&lt;div id="bug-605652"&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;We would like to merge the Gloda bar and Quick Filter bar, cause duh.
  &lt;/p&gt;&lt;div id="bug-667246"&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Having two different settings locations is too confusing for me, let
  alone people who don’t care about the details of the product. We want to
  merge those into a single searchable place for all the settings, a la Mac
  System Prefs.
  &lt;/p&gt;&lt;div id="bug-509397"&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;This next change is more a small, personal thing, rather than part of a
  grand plan.  It was originally suggested by &lt;a href="http://beltzner.ca/mike/"&gt;Mike Beltzner&lt;/a&gt;, and while I’ve had some time to work on it, I
  haven’t had enough to push it through to completion.  Basically, I’ld
  like to be able to order my email by date, while grouping it by subject.
  (This is different than threading, because I don’t care about which
  replies are to which messages.  I just want a single group for the
  subject, with the messages ordered by date within that group, and the
  groups ordered by the date of the most recent message.)  There’s no bug
  for this yet, but as mentioned, I started to write &lt;a href="http://hg.mozilla.org/users/bwinton_latte.ca/bmode/file/65d446ca2d54"&gt;an extension&lt;/a&gt;,
  before hitting some annoying bugs that made it hard.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Compactify the header.  It’s really too big.  Well, that’s a bit of a
  lie.  What I really mean here is that we should move the buttons and
  their toolbar out of the header, to float just above it.  This would
  allow people to easily turn them off (by removing the entire toolbar),
  and for those of us who like to keep them, it would make them more
  visually distinct.  As an added bonus, in vertical mode, we could merge
  that toolbar with the other toolbars, to get something like &lt;a href="http://www.flickr.com/photos/asadotzler/6137086055/"&gt;the
  pictures&lt;/a&gt; of what
  Thunderbird could look like posted by &lt;a href="http://weblogs.mozillazine.org/asa/"&gt;Asa Dotzler&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;And finally, I think we should remove the Migration Assistant.  It was
  very useful in the 2.0⇒3.0 transition, but it’s been less and less useful
  as time goes on, and as people have moved more and more onto Thunderbird
  3, and 4, and 5…  (No bug for this one either, again, because removals
  are sensitive things.)&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;See &lt;a href="https://bwinton.github.io/weblog.latte.ca/blake/tech/thunderbird/uifutures/" class="all-bugs"&gt;all the bugs&lt;/a&gt; in one big list.&lt;/p&gt;
&lt;p&gt;&lt;small&gt;Many thank-yous to &lt;a href="http://blog.mozilla.com/faaborg/"&gt;Alex Faaborg&lt;/a&gt;, and &lt;a href="http://www.areweprettyyet.com/"&gt;areweprettyyet&lt;/a&gt; for the code to link the bugs, and the
basis of the styling to make them stand out.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description><category>future</category><category>mozilla</category><category>thunderbird</category><category>ui</category><guid>https://bwinton.github.io/weblog.latte.ca/blake/tech/thunderbird/uifutures/</guid><pubDate>Tue, 27 Sep 2011 15:02:38 GMT</pubDate></item><item><title>A Proposal for Updates with Add-ons.</title><link>https://bwinton.github.io/weblog.latte.ca/blake/tech/thunderbird/updates/</link><dc:creator>Blake Winton</dc:creator><description>&lt;div&gt;&lt;p&gt;Add-ons are an important part of many Mozilla products, and many people
have noticed that they’ve taken a hit as we’ve switched to the Rapid
Release process.  To help users have a little more control over how well
their Firefox works, I would like to propose the following slight
modification to the automatic Update process:&lt;/p&gt;
&lt;p&gt;It all starts when Firefox (and Thunderbird) notice an update is available.&lt;/p&gt;
&lt;p&gt;We immediately check the user’s add-ons to see if they are compatible, or
if there are compatible versions we haven’t downloaded yet.&lt;/p&gt;
&lt;p&gt;If all the add-ons are compatible (or will be made so at the next
download), we show the NoAddons dialog:&lt;/p&gt;
&lt;p&gt;&lt;img alt="NoAddons dialog" src="https://bwinton.github.io/weblog.latte.ca/images/blake/updates/NoAddons.png"&gt;&lt;/p&gt;
&lt;p&gt;It‘s the same as the current Firefox or Thunderbird update dialog, and as
you would expect, the “Ask Later” and “Update Firefox” buttons do the same
things that they do now.&lt;/p&gt;
&lt;p&gt;On the other hand, if there &lt;em&gt;are&lt;/em&gt; in-compatible add-ons, we show the Addons
dialog:&lt;/p&gt;
&lt;p&gt;&lt;img alt="Addons dialog" src="https://bwinton.github.io/weblog.latte.ca/images/blake/updates/Addons.png"&gt;&lt;/p&gt;
&lt;p&gt;As you can see, we let the user know which add-ons are incompatible, and
give the user an extra button at the bottom to do something different.&lt;/p&gt;
&lt;p&gt;The new “Update when my add-ons work” button (wording to be clarified
later) will check the add-ons periodically, and automatically update
Firefox when all the add-ons are compatible.  If the add-ons aren’t
compatible after a week (period of time to be configurable), the user will
be shown this dialog again, with the (hopefully smaller) list of
incompatible add-ons.&lt;/p&gt;
&lt;p&gt;Showing the user which add-ons are incompatible will let them decide
whether the add-ons are important enough to not upgrade, or whether they
can live with the (hopefully short) period of reduced functionality.&lt;/p&gt;
&lt;p&gt;As always, comments welcome, but keep them polite or they’ll be deleted.&lt;/p&gt;&lt;/div&gt;</description><category>add-ons</category><category>firefox</category><category>mozilla</category><category>thunderbird</category><category>update</category><guid>https://bwinton.github.io/weblog.latte.ca/blake/tech/thunderbird/updates/</guid><pubDate>Thu, 08 Sep 2011 18:49:44 GMT</pubDate></item><item><title>Who should review my change?</title><link>https://bwinton.github.io/weblog.latte.ca/blake/tech/thunderbird/reviewerchooser/</link><dc:creator>Blake Winton</dc:creator><description>&lt;div&gt;&lt;p&gt;One of the big questions I had when I started writing patches was who I
should ask to review them.  Now that I’ve been in the community for a
while, I’ve got a much better sense of who I should be talking to for the
type of things I’m likely to write, but there are still times when I want
to make a change in a part of the code that I haven’t touched before, and
I’m not sure who to ask.  In those cases, I usually fall back to a fairly
simple (if non-obvious) set of steps to try and figure out who to pick.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Get the list of files I’ve changed.&lt;/li&gt;
&lt;li&gt;Get the hg log for those files.&lt;/li&gt;
&lt;li&gt;Check through the log for “r=”, and “sr=”.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Of course, that’s a fairly easy set of steps to automate, and so I present
my first cut at &lt;a href="https://github.com/bwinton/Mozilla-Tools/blob/master/getReviewer.py"&gt;the automated reviewer chooser&lt;/a&gt;!&lt;/p&gt;
&lt;p&gt;Of course, there are a lot of things I’ld like to do with this, such as:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Improving the documentation.&lt;/li&gt;
&lt;li&gt;Checking to see how well this script would have done on previous commits.&lt;/li&gt;
&lt;li&gt;Taking into account the length of the queues for the reviewers.&lt;/li&gt;
&lt;li&gt;Adding some sort of recent-ness calculations.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;But I think that this tool is useful enough in its current state that
releasing it and getting feedback on what to actually work on would be a
win.&lt;/p&gt;
&lt;p&gt;To use it, be in a mercurial source repo, and type &lt;code&gt;getReviewer.py&lt;/code&gt; to get
a list of suggested reviewers for the current differences, or
&lt;code&gt;getReviewer.py temp.diff&lt;/code&gt; or &lt;code&gt;getReviewer.py
https://bugzilla.mozilla.org/attachment.cgi\?id\=536017&lt;/code&gt; to specify a
different set of changes.&lt;/p&gt;&lt;/div&gt;</description><category>mozilla</category><category>review</category><category>thunderbird</category><guid>https://bwinton.github.io/weblog.latte.ca/blake/tech/thunderbird/reviewerchooser/</guid><pubDate>Thu, 02 Jun 2011 00:13:37 GMT</pubDate></item><item><title>New GetAnAccount UI.</title><link>https://bwinton.github.io/weblog.latte.ca/blake/tech/thunderbird/getanaccountuiupdate/</link><dc:creator>Blake Winton</dc:creator><description>&lt;div&gt;&lt;p&gt;Since &lt;a href="http://mozillalabs.com/messaging/2010/12/14/get-an-account/"&gt;we released&lt;/a&gt; the
&lt;a href="https://addons.mozilla.org/en-US/thunderbird/addon/get-an-account/"&gt;GetAnAccount addon&lt;/a&gt;, we’ve
had a lot of feedback.  Many of the people who commented were looking for
the option of getting an ad-supported account instead of paying for email
access.  We were always planning on integrating ad-supported services, as
soon as we could, but of course, doing this required a redesign.&lt;/p&gt;
&lt;p&gt;One important note before we get to the good stuff: I’ve used GMail soley
as an example of a well-known ad-supported email provider here.  We may or
may not be partnering with them, and you should not take these screenshots
as proof of our intentions one way or another.&lt;/p&gt;
&lt;p&gt;As you can see from this first mockup, the initial view makes it much more
obvious that you don’t need to create a new account just to use
Thunderbird.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;center&gt;&lt;a href="https://bwinton.github.io/weblog.latte.ca/images/blake/GetAnAccount/01-Initial_View.svg"&gt;&lt;img src="https://bwinton.github.io/weblog.latte.ca/images/blake/GetAnAccount/01-Initial_View.svg" title="Initial View" alt="Initial View" width="50%" align="center"&gt;&lt;/a&gt;&lt;/center&gt;
&lt;p&gt;If you click in the bottom half, it expands up to make it more obvious that
that’s what you want to do, and to allow us to display more information
(although we don’t have any extra information to display there yet.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;center&gt;&lt;a href="https://bwinton.github.io/weblog.latte.ca/images/blake/GetAnAccount/02-Click_on_Bottom.svg"&gt;&lt;img src="https://bwinton.github.io/weblog.latte.ca/images/blake/GetAnAccount/02-Click_on_Bottom.svg" title="Click on Bottom" alt="Existing Address" width="50%" align="center"&gt;&lt;/a&gt;&lt;/center&gt;
&lt;p&gt;On the other hand, if you click on the top, we do have more information
that you probably want to see before continuing on.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;center&gt;&lt;a href="https://bwinton.github.io/weblog.latte.ca/images/blake/GetAnAccount/03-Click_on_Top.svg"&gt;&lt;img src="https://bwinton.github.io/weblog.latte.ca/images/blake/GetAnAccount/03-Click_on_Top.svg" title="Click on Top" alt="New Address" width="50%" align="center"&gt;&lt;/a&gt;&lt;/center&gt;
&lt;p&gt;And this is something like what we hope to show you when the results have
been returned.  (Note: the Terms of Service, Existing Account, and Do It
Later buttons are still there, but have been scrolled off the bottom of
the dialog in this mockup.)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;center&gt;&lt;a href="https://bwinton.github.io/weblog.latte.ca/images/blake/GetAnAccount/04-Searched.svg"&gt;&lt;img src="https://bwinton.github.io/weblog.latte.ca/images/blake/GetAnAccount/04-Searched.svg" title="Search Results" alt="Search Results" width="50%" align="center"&gt;&lt;/a&gt;&lt;/center&gt;
&lt;p&gt;And finally, once you pick one of the providers, we expand that list to
show you all of the results for that provider.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;center&gt;&lt;a href="https://bwinton.github.io/weblog.latte.ca/images/blake/GetAnAccount/05-Chosen.svg"&gt;&lt;img src="https://bwinton.github.io/weblog.latte.ca/images/blake/GetAnAccount/05-Chosen.svg" title="Choose a Provider" alt="Provider Chosen" width="50%" align="center"&gt;&lt;/a&gt;&lt;/center&gt;
&lt;p&gt;Feedback, as always, is welcome, either here or in &lt;a href="http://groups.google.com/group/mozilla-labs"&gt;the forum&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;</description><category>getanaccount</category><category>mozilla</category><category>thunderbird</category><guid>https://bwinton.github.io/weblog.latte.ca/blake/tech/thunderbird/getanaccountuiupdate/</guid><pubDate>Fri, 01 Apr 2011 01:41:40 GMT</pubDate></item><item><title>OpenSearch add-on for Thunderbird updated!</title><link>https://bwinton.github.io/weblog.latte.ca/blake/tech/thunderbird/opensearch/</link><dc:creator>Blake Winton</dc:creator><description>&lt;div&gt;&lt;p&gt;Over the past week, I’ve been working on fixing some of &lt;a href="https://github.com/mozilla/opensearch/issues"&gt;the reported
bugs&lt;/a&gt; in the OpenSearch
add-on for Thunderbird, and now I think I’ve &lt;a href="https://github.com/mozilla/opensearch/issues/closed"&gt;fixed enough&lt;/a&gt; of them to release a
new version.  &lt;/p&gt;
&lt;p&gt;You can find the full details on &lt;a href="http://mozillalabs.com/messaging/2011/02/25/opensearch-updated/"&gt;the Mozilla Labs blog&lt;/a&gt;, or you
could just jump straight to &lt;a href="https://addons.mozilla.org/en-US/thunderbird/addon/opensearch/"&gt;the OpenSearch add-on page&lt;/a&gt; to install
it.  And please leave your feedback about the add-on on &lt;a href="https://groups.google.com/d/topic/mozilla-labs/t1wGyH8CDmQ/discussion"&gt;our Google group&lt;/a&gt;!&lt;/p&gt;&lt;/div&gt;</description><category>mozilla</category><category>opensearch</category><category>thunderbird</category><guid>https://bwinton.github.io/weblog.latte.ca/blake/tech/thunderbird/opensearch/</guid><pubDate>Fri, 25 Feb 2011 16:25:47 GMT</pubDate></item><item><title>What files have the most bugs?</title><link>https://bwinton.github.io/weblog.latte.ca/blake/tech/thunderbird/wherearethebugs/</link><dc:creator>Blake Winton</dc:creator><description>&lt;div&gt;&lt;p&gt;I was reading &lt;a href="http://oreilly.com/catalog/9780596808303"&gt;Making Software&lt;/a&gt;
by Andy Oram and Greg Wilson, and got to the chapter about An Automated
Fault Prediction System.  It’s a pretty neat chapter, and it got me
wondering which files in the &lt;a href="http://mxr.mozilla.org/comm-central/"&gt;Thunderbird code base&lt;/a&gt; had the most bugs.  Now, I don’t have
all the info I need, but I figured an easy first pass would be to go
through the commit logs, and for each commit that started with “bug ”, add
one to the files changed in that commit.  Hmm, that sounded unintuitive.
Let me just paste (&lt;a href="https://bwinton.github.io/weblog.latte.ca/static/blake/test.py"&gt;and link&lt;/a&gt;) the code:&lt;/p&gt;
&lt;table class="codehilitetable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt; 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;pre class="code literal-block"&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;mercurial&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;ui&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;hg&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;operator&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;re&lt;/span&gt;

&lt;span class="n"&gt;ext&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;re&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;compile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"(\.c(pp)?|\.js|\.xml)$"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;repo&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;hg&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;repository&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ui&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ui&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="s2"&gt;"."&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;changes&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;repo&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;repo&lt;/span&gt;
                   &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;repo&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;description&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;lower&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;startswith&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"bug "&lt;/span&gt;&lt;span class="p"&gt;)]&lt;/span&gt;

&lt;span class="n"&gt;master&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt;

&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;change&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;changes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="n"&gt;files&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;change&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;files&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;ext&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;search&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;)]&lt;/span&gt;
  &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;files&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;master&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;master&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;


&lt;span class="n"&gt;files&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;master&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;items&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;files&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sort&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;counts&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;master&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;items&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;counts&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sort&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;operator&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;itemgetter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;span class="n"&gt;counts&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;reverse&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;join&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="s2"&gt;":"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;counts&lt;/span&gt;&lt;span class="p"&gt;[:&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;]])&lt;/span&gt;
&lt;/pre&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;

&lt;p&gt;And so, without further ado, here are the files that have been changed the
most in bug fixes, and the number of times they've been changed:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;mail/base/content/mailWindowOverlay.js:109&lt;/li&gt;
&lt;li&gt;suite/browser/browser-prefs.js:73&lt;/li&gt;
&lt;li&gt;suite/browser/navigator.js:70&lt;/li&gt;
&lt;li&gt;mail/base/content/msgMail3PaneWindow.js:69&lt;/li&gt;
&lt;li&gt;mail/app/profile/all-thunderbird.js:67&lt;/li&gt;
&lt;li&gt;suite/common/src/nsSessionStore.js:66&lt;/li&gt;
&lt;li&gt;mail/components/compose/content/MsgComposeCommands.js:60&lt;/li&gt;
&lt;li&gt;mailnews/imap/src/nsImapMailFolder.cpp:56&lt;/li&gt;
&lt;li&gt;suite/browser/tabbrowser.xml:53&lt;/li&gt;
&lt;li&gt;mail/base/content/msgHdrViewOverlay.js:52&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;p&gt;&lt;small&gt;As a side note, for the &lt;a href="http://mxr.mozilla.org/mozilla-central/"&gt;mozilla repo&lt;/a&gt; it looks like this:&lt;/small&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;small&gt;js/src/jstracer.cpp:780&lt;/small&gt;&lt;/li&gt;
&lt;li&gt;&lt;small&gt;browser/base/content/browser.js:654&lt;/small&gt;&lt;/li&gt;
&lt;li&gt;&lt;small&gt;layout/base/nsCSSFrameConstructor.cpp:410&lt;/small&gt;&lt;/li&gt;
&lt;li&gt;&lt;small&gt;layout/base/nsPresShell.cpp:400&lt;/small&gt;&lt;/li&gt;
&lt;li&gt;&lt;small&gt;js/src/jsobj.cpp:399&lt;/small&gt;&lt;/li&gt;
&lt;li&gt;&lt;small&gt;browser/base/content/tabbrowser.xml:397&lt;/small&gt;&lt;/li&gt;
&lt;li&gt;&lt;small&gt;widget/src/windows/nsWindow.cpp:390&lt;/small&gt;&lt;/li&gt;
&lt;li&gt;&lt;small&gt;toolkit/components/places/src/nsNavHistory.cpp:374&lt;/small&gt;&lt;/li&gt;
&lt;li&gt;&lt;small&gt;js/src/jsinterp.cpp:345&lt;/small&gt;&lt;/li&gt;
&lt;li&gt;&lt;small&gt;js/src/jsapi.cpp:343&lt;/small&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;</description><category>making_software</category><category>mozilla</category><category>thunderbird</category><guid>https://bwinton.github.io/weblog.latte.ca/blake/tech/thunderbird/wherearethebugs/</guid><pubDate>Fri, 24 Dec 2010 19:59:24 GMT</pubDate></item><item><title>Making sure I don’t forget things.</title><link>https://bwinton.github.io/weblog.latte.ca/blake/tech/thunderbird/checklists/</link><dc:creator>Blake Winton</dc:creator><description>&lt;div&gt;&lt;p&gt;I’ve created a couple of checklists, and would like to hear any feedback on
them.  They are a &lt;a href="https://wiki.mozilla.org/User:Bwinton/Review_Checklist"&gt;Review Checklist&lt;/a&gt;, and a &lt;a href="https://wiki.mozilla.org/User:Bwinton/Commit_Checklist"&gt;Commit
Checklist&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;They came about after I had been working mostly on experimental add-ons for
a while, and then attempted to push a couple of reviewed fixes.  Since I
was out of practice, I managed to get something minor wrong on both of the
pushes.  (The first one failed to attribute the patch to the proper author;
The second one failed to mention the bug number in the commit message.)
Since I’m a bit of a perfectionist, this really annoyed me, and so I vowed
to write up the steps that I go through when I need to commit and push a
patch, so that I could refer to them later, since if &lt;a href="http://us.macmillan.com/thechecklistmanifesto"&gt;checklists can save
lives&lt;/a&gt;, then I figure they
can probably also help me do my job better.  But before I go to that, I
needed to review a patch, so I wrote up some of the things I look for when
I review a patch too.&lt;/p&gt;&lt;/div&gt;</description><category>checklists</category><category>commit</category><category>mozilla</category><category>review</category><category>thunderbird</category><guid>https://bwinton.github.io/weblog.latte.ca/blake/tech/thunderbird/checklists/</guid><pubDate>Sun, 05 Dec 2010 00:49:11 GMT</pubDate></item><item><title>DOM appendChild error in Gecko 2.0</title><link>https://bwinton.github.io/weblog.latte.ca/blake/tech/thunderbird/appendchild/</link><dc:creator>Blake Winton</dc:creator><description>&lt;div&gt;&lt;p&gt;I was recently modifying an add-on for the upcoming Thunderbird 3.3, and
part of what I wanted to do was to run some javascript in a chrome context
that added some DOM nodes to a document in a content context.  But when I
ran the following code:&lt;/p&gt;
&lt;table class="codehilitetable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1
2
3
4
5
6
7
8
9&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;pre class="code literal-block"&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;browser&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'tabmail'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;getBrowserForSelectedTab&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;doc&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;browser&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;contentDocument&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;dump&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"\n\n\n\nXXXXXXXXXX\n"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;dump&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"DOM Content loaded for "&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;doc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;location&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="s2"&gt;"\n"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;topBar&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;createElement&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"div"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;topBar&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;innerHTML&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"We got it!!!!!"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;dump&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"iB = "&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="nx"&gt;doc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;body&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;insertBefore&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="s2"&gt;"\n"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;dump&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"fC = "&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="nx"&gt;doc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;body&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;firstChild&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="s2"&gt;"\n"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;doc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;body&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;insertBefore&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;topBar&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;doc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;body&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;firstChild&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/pre&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;

&lt;p&gt;I got the following error:&lt;/p&gt;
&lt;pre class="code literal-block"&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;WARNING&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;NS_ENSURE_SUCCESS&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;rv&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="n"&gt;rv&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="n"&gt;failed&lt;/span&gt; &lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="mh"&gt;0x80530009&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;file&lt;/span&gt; &lt;span class="sr"&gt;/Volumes/Devel/thunderbird/src-central/mozilla/content/base/src/&lt;/span&gt;&lt;span class="n"&gt;nsNodeUtils&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;h&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="n"&gt;line&lt;/span&gt; &lt;span class="mi"&gt;304&lt;/span&gt;
&lt;span class="n"&gt;WARNING&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;NS_ENSURE_SUCCESS&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;rv&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="n"&gt;rv&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="n"&gt;failed&lt;/span&gt; &lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="mh"&gt;0x80530009&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;file&lt;/span&gt; &lt;span class="sr"&gt;/Volumes/Devel/thunderbird/src-central/mozilla/content/base/src/&lt;/span&gt;&lt;span class="n"&gt;nsGenericElement&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;cpp&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="n"&gt;line&lt;/span&gt; &lt;span class="mi"&gt;4077&lt;/span&gt;
&lt;span class="o"&gt;--&lt;/span&gt; &lt;span class="n"&gt;Exception&lt;/span&gt; &lt;span class="n"&gt;object&lt;/span&gt; &lt;span class="o"&gt;--&lt;/span&gt;
&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;snip&lt;/span&gt;&lt;span class="err"&gt;…&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;
&lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;message&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;string&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="s1"&gt;'Operation is not supported'&lt;/span&gt;
&lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;number&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="mi"&gt;2152923145&lt;/span&gt;
&lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;string&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="s1"&gt;'NS_ERROR_DOM_NOT_SUPPORTED_ERR'&lt;/span&gt;
&lt;/pre&gt;


&lt;p&gt;Poking around a little, it seemed like I had reasonable things for the
&lt;tt&gt;insertBefore&lt;/tt&gt; method, the &lt;tt&gt;firstChild&lt;/tt&gt; attribute, and the
&lt;tt&gt;topBar&lt;/tt&gt; variable, and so since it was late, and I couldn't see what
I had done wrong, I went to bed.&lt;/p&gt;
&lt;p&gt;That turned out to be a the best thing for me to do, because this morning
&lt;a href="http://blog.xulforum.org"&gt;Jonathan Protzenko&lt;/a&gt; came to the rescue, saying
(&lt;a href="http://groups.google.com/group/mozilla.dev.extensions/browse_thread/thread/cd6f0f02b6bc60f4#"&gt;in response to a similar problem&lt;/a&gt;
with a Firefox 4.0 beta 7 extension):&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;If you're modifying some content DOM from chrome code, you need to make
sure the child you're appending was created using the unprivileged
document, not the global document.&lt;/p&gt;
&lt;pre class="code literal-block"&gt;&lt;span&gt;&lt;/span&gt;// This is chrome code, this is wrong because the span is now chrome
// and you're trying to insert it into content
myContentNode.appendChild(document.createElement("span"))

// This is right, appending a content node to another content node
myContentNode.appendChild(myContentNode.ownerDocument.createElement("span"))
&lt;/pre&gt;


&lt;p&gt;I've hit this issue at least three times when upgrading stuff for Gecko
2.0. Might be what you're looking for .&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;And sure enough, when I changed &lt;tt&gt;var topBar =
document.createElement("div");&lt;/tt&gt; to &lt;tt&gt;var topBar =
doc.createElement("div");&lt;/tt&gt;
, it all started working beautifully.&lt;/p&gt;
&lt;p&gt;Thank you, Jonathan!&lt;/p&gt;&lt;/div&gt;</description><category>firefox</category><category>mozilla</category><category>thunderbird</category><guid>https://bwinton.github.io/weblog.latte.ca/blake/tech/thunderbird/appendchild/</guid><pubDate>Tue, 30 Nov 2010 15:58:11 GMT</pubDate></item></channel></rss>