Last Comment Bug 696347 - Compact Folders throws error message cmd_compactFolder. TypeError: this._resetThreadPane is not a function
: Compact Folders throws error message cmd_compactFolder. TypeError: this._rese...
Status: RESOLVED FIXED
: regression
Product: Thunderbird
Classification: Client Software
Component: Folder and Message Lists (show other bugs)
: 7 Branch
: All All
: -- normal (vote)
: Thunderbird 12.0
Assigned To: Magnus Melin
:
Mentors:
Depends on:
Blocks: 474701
  Show dependency treegraph
 
Reported: 2011-10-21 03:06 PDT by Alexander Bergmann
Modified: 2012-02-16 07:54 PST (History)
8 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
proposed fix (1.17 KB, patch)
2011-12-31 04:52 PST, Magnus Melin
bugmail: review+
Details | Diff | Review

Description Alexander Bergmann 2011-10-21 03:06:05 PDT
If I try to compact all folders of the current account using "File -> Compact Folders", I get an error message in the Error Console of Thunderbird. (However, the actual compacting is done successfully.)

1. Create a New Profile
2. Add POP account
3. Select any folder, e.g. "Local Folders -> Outbox"
4. "File -> Compact Folders"
5. Open the Error Console ("Tools -> Error Console")

Error: An error occurred executing the cmd_compactFolder command: TypeError: this._resetThreadPane is not a function
Source File: chrome://global/content/globalOverlay.js
Line: 100

Arch Linux / Thunderbird 7.0.1
Comment 1 :aceman 2011-10-21 14:49:16 PDT
Confirming on linux, TB7 and TB8.
Comment 2 :aceman 2011-12-19 10:57:08 PST
I couldn't find any declaration for the _resetThreadPane() function in the whole comm-central tree. 
The function is called from mail/base/content/folderPane.js line 2300. I don't know what it is supposed to do but the exception probably isn't intentional. Magnus Melin, it seems you merged that line into the file, can you find out what is it for?
Comment 3 Magnus Melin 2011-12-19 22:54:38 PST
Looks like i only changed the indention (and such) - http://hg.mozilla.org/comm-central/diff/2f6ef8daa83e/mail/base/content/folderPane.js. I don't know what it's for. Maybe hg grep can tell... or then it was obsolete when i touched the code already.
Comment 4 :aceman 2011-12-20 02:42:08 PST
I see now. Can you find out who put it there before? But maybe it is from the time before hg.
Comment 5 Magnus Melin 2011-12-30 11:25:27 PST
Ok, so this is a regression from bug 474701 which removed that function - http://hg.mozilla.org/comm-central/diff/b0e37b312b54/mail/base/content/folderPane.js but forgot to remove it from this one place.
Comment 6 Magnus Melin 2011-12-31 04:52:42 PST
Created attachment 585128 [details] [diff] [review]
proposed fix

Remove it.
Comment 7 Andrew Sutherland [:asuth] 2012-01-01 10:18:20 PST
Comment on attachment 585128 [details] [diff] [review]
proposed fix

Oops!  Thanks for reporting this and thanks for the fix!
Comment 8 Magnus Melin 2012-01-01 11:05:05 PST
http://hg.mozilla.org/comm-central/rev/e358fbbcf194
->FIXED
Comment 9 :aceman 2012-01-02 08:01:27 PST
Had this been written in C, the compiler could have caught this.
Is there any such tool (static analysis) for Javascript code in Gecko? Or is it not possible to check for undefined functions in JS?
Comment 10 Ludovic Hirlimann [:Usul] 2012-02-16 07:54:47 PST
(In reply to :aceman from comment #9)
> Had this been written in C, the compiler could have caught this.
> Is there any such tool (static analysis) for Javascript code in Gecko? Or is
> it not possible to check for undefined functions in JS?

Joshua ?

Note You need to log in before you can comment on or make changes to this bug.