Thunderbird8の迷惑メールフィルタがバグっている件について

普段メールを送受信するのにThunderbirdを使っているのだけど、最近のバージョンになって、迷惑メールフィルタの調子がおかしい。手動で迷惑メールフィルタを実行すると、大体5,60件ぐらいマークを付けて止まってしまう。再度実行すると、マークが付いていないメールについてチェックしてくれるのだけど、これも同じぐらいの件数で止まってしまう。
迷惑メールフィルタ実行を連打すれば、全てのメールをチェックできるとは言え、これはあまりにも不便過ぎる。
当然ながら、一般ユーザにとっては不可解極まりない不具合として映るわけで、Bugzilla に速攻でポストされていた。

Actual results:

the first approximately 20 messages were marked junk (correctly) in approximately one second. It then stopped checking and the remaining 980 messages were not checked to be junk or not.
gMessengerBundle is not defined
chrome://messenger/content/junkCommands.js Line: 276

697740 - "Run Junk Mail Controls on Folder" quits early with error gMessengerBundle is not defined chrome://messenger/content/junkCommands.js Line: 276

報告内容から、junkCommands.jsで定義されていない変数gMessengerBundleを参照して転けているらしいことが分かる。ソースコードを当たってみると確かにそうだ。

         window.MsgStatusFeedback.showStatusString(
            gMessengerBundle.getFormattedString("junkAnalysisPercentComplete",

で、gMessengerBundleとは何なのか……上記のコード片からは、文字列資源を管理しているオブジェクトである以上のことは読み取れない。どうしてそんな重要なものが消えているの?
とりあえず検索してみると、今度は次のBugzillaに行き着いた。

This patch removes gMessengerBundle and gBrandBundle. It also includes a bit of code to clean up how we open windows, but that part should be very straightforward.

458548 - Get rid of string-bundle globals

んん、このパッチはgMessengerBundleを削除します……?パッチをのぞいてみると、迷惑メールフィルタでgMessengerBundleを使っている部分を消去する差分記述がない。
comm-releaseのTHUNDERBIRD_8_0_RELEASEタグが付いたツリーと、comm-centralのDEFAULTツリーを確認してみると、確かにgMessengerBundleの宣言が消えていて、迷惑メールフィルタのgMessengerBundleの参照が消えていない。つまり、このパッチで見逃しを食らっていたと言うことか。
連打するのも腹立たしいので、パッチを書いて、omni.jarの中身に適用してきた。ソースコードツリー(base=THUNDERBIRD_8_0_RELEASE)に対するパッチは以下の通り。

diff -ur a/mailnews/base/content/junkCommands.js b/mailnews/base/content/junkCommands.js
--- a/mailnews/base/content/junkCommands.js	2011-11-05 17:49:32.000000000 +0900
+++ b/mailnews/base/content/junkCommands.js	2011-12-06 10:44:38.000000000 +0900
@@ -261,6 +261,7 @@
     else if (aClassification == nsIJunkMailPlugin.GOOD)
       this.mGoodMsgHdrs.appendElement(msgHdr, false);
 
+    let bundle = document.getElementById("bundle_messenger");
     var nextMsgURI = this.mMessageQueue.shift();
     if (nextMsgURI)
     {
@@ -273,7 +274,7 @@
           percentDone = Math.round(this.mProcessedMessages * 100 / this.mTotalMessages);
         var percentStr = percentDone + "%";
         window.MsgStatusFeedback.showStatusString(
-            gMessengerBundle.getFormattedString("junkAnalysisPercentComplete",
+            bundle.getFormattedString("junkAnalysisPercentComplete",
                                                 [percentStr]));
       }
 
@@ -284,7 +285,7 @@
     else
     {
       window.MsgStatusFeedback.showStatusString(
-          gMessengerBundle.getString("processingJunkMessages"));
+          bundle.getString("processingJunkMessages"));
       performActionsOnJunkMsgs(this.mFolder, this.mJunkMsgHdrs, this.mGoodMsgHdrs);
       window.MsgStatusFeedback.showStatusString("");
     }

DEFAULTまで見逃されているってどういうことよ……。

追記(2012/01/06)

bugfixがcheck inされました、がTB9に間に合わず、TB10に投入予定だそうです。
死ぬがよい