Closed
Bug 1485947
Opened 7 years ago
Closed 5 years ago
Exception - no active filterer but we want one.
Categories
(Thunderbird :: General, defect)
Tracking
(Not tracked)
RESOLVED
WORKSFORME
People
(Reporter: axel.grude, Unassigned)
Details
Attachments
(1 file)
|
2.89 KB,
application/x-javascript
|
Details |
On Startup, I see the following error trace in the log:
Error: Caught Exception Error: There is no active filterer but we want one.
errorWithDebug@resource:///modules/errUtils.js:72:10
get activeFilterer@chrome://messenger/content/quickFilterBar.js:530:11
appendTerms@resource://expressionsearch/ExpressionSearchFilter.js:380:17
MFM_createSearchTerms@resource:///modules/quickFilterManager.js:510:11
MFS_createSearchTerms@resource:///modules/quickFilterManager.js:156:12
QFBM_updateSearch@chrome://messenger/content/quickFilterBar.js:588:7
QFBM_onTabRestored@chrome://messenger/content/quickFilterBar.js:429:5
openTab@chrome://messenger/content/tabmail.xml:579:15
restoreTab@chrome://messenger/content/mailTabs.js:244:13
QuickFolders_PrepareSessionStore/mailTabType.modes.folder.restoreTab@chrome://quickfolders/content/quickfolders.js:521:4
restoreTab@chrome://messenger/content/tabmail.xml:1000:11
restoreTabs@chrome://messenger/content/tabmail.xml:1024:18
atStartupRestoreTabs@chrome://messenger/content/msgMail3PaneWindow.js:688:5
My Addon (QuickFolders) wraps restoreTab in order to store a "selected Category string" for every 3pane tab - it is added as tabInfo.QuickFoldersCategory. Why this requires a filterer to be set is unclear to me.
There is probably a better way to implement this, here is the current code:
// overwrite restoreTab
let orgRestore = mailTabType.modes["folder"].restoreTab; // we might have to use QuickFolders.Util.mailFolderTypeName instead "folder" for SeaMonkey
mailTabType.modes["folder"].restoreTab = function(aTabmail, aPersistedState) {
orgRestore(aTabmail, aPersistedState);
let rdf = Components.classes['@mozilla.org/rdf/rdf-service;1'].getService(Components.interfaces.nsIRDFService),
folder = rdf.GetResource(aPersistedState.folderURI).QueryInterface(Components.interfaces.nsIMsgFolder);
if (folder && aPersistedState.QuickFoldersCategory) {
let tabInfo, theUri;
// Thunderbird only code, so it is fine to use tabInfo here:
for (let i = 0; i < aTabmail.tabInfo.length; i++)
{
tabInfo = aTabmail.tabInfo[i];
if (tabInfo && tabInfo.folderDisplay && tabInfo.folderDisplay.view && tabInfo.folderDisplay.view.displayedFolder) {
theUri = tabInfo.folderDisplay.view.displayedFolder.URI;
if (theUri == aPersistedState.folderURI) {
tabInfo.QuickFoldersCategory = aPersistedState.QuickFoldersCategory;
return;
}
}
}
}
}
| Reporter | ||
Comment 1•7 years ago
|
||
More context, here is the complete object and the way it is being called (a global timeout of 5000ms which is ugly as well). Not sure what the correct point of time for this is; I guess I could move it into QuickFOlders instantiation routine and restore the Categories manually there on startup to work around the bug. What's the best approach for expanding the tab restore functionality?
The error is thrown when
orgRestore(aTabmail, aPersistedState);
is called. (line 44 of attached code)
Comment 2•7 years ago
|
||
What is the way forward for this?
Flags: needinfo?(mkmelin+mozilla)
Flags: needinfo?(geoff)
Comment 3•7 years ago
|
||
appendTerms@resource://expressionsearch/ExpressionSearchFilter.js:380:17
Maybe try it without Expression Search running?
Flags: needinfo?(geoff)
Updated•7 years ago
|
Flags: needinfo?(mkmelin+mozilla)
| Reporter | ||
Comment 5•5 years ago
|
||
I haven't seen this bug in a long time, so I presume it is fixed
Status: NEW → RESOLVED
Closed: 5 years ago
Flags: needinfo?(axel.grude)
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•