Beginning on October 25th, 2016, Persona will no longer be an option for authentication on BMO. For more details see Persona Deprecated.
Last Comment Bug 761983 - JS error when closing the Thunderbird main window in a removeObserver call in search.xml
: JS error when closing the Thunderbird main window in a removeObserver call in...
Product: Thunderbird
Classification: Client Software
Component: Search (show other bugs)
: Trunk
: All All
: -- minor (vote)
: Thunderbird 16.0
Assigned To: Florian Quèze [:florian] [:flo]
: 740495 (view as bug list)
Depends on:
Blocks: 738778 515803
  Show dependency treegraph
Reported: 2012-06-06 04:26 PDT by Florian Quèze [:florian] [:flo]
Modified: 2012-06-15 04:02 PDT (History)
3 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---

Patch (4.29 KB, patch)
2012-06-06 04:26 PDT, Florian Quèze [:florian] [:flo]
mconley: review+
standard8: approval‑comm‑aurora+
Details | Diff | Splinter Review

Description Florian Quèze [:florian] [:flo] 2012-06-06 04:26:10 PDT
Created attachment 630504 [details] [diff] [review]

JavaScript error: , line 0: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIObserverService.removeObserver]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: chrome://messenger/content/search.xml ::  :: line 156"  data: no]

We currently have more than one search field in the UI (there's one on the 3 pane mail tab, one on the chat tab, and an additional one per open search tab), we have this error when closing the window once for each search field that wasn't the one of the 3 pane mail tab.

It seems the code causing this error was added in bug 515803 to workaround bug 83635 which is now fixed.

Reverting the changes from bug 515803 lets each search box have its own observer, so that removing it doesn't fail when the destructor is called (as it now seems to be called reliably! :)).

However, when selecting a proposed completion from the autocomplete popup, each observer receives the notification and opens a gloda search tab, which is undesirable. I've added a check on the value of aSubject in the observe method to prevent this.

(CC'ing davida who fixed bug 515803, so that he can tell me if I misunderstood the situation.)
Comment 1 Florian Quèze [:florian] [:flo] 2012-06-06 07:33:39 PDT
*** Bug 740495 has been marked as a duplicate of this bug. ***
Comment 2 Mike Conley (:mconley) - (high latency on reviews and needinfos) 2012-06-06 12:11:19 PDT
Comment on attachment 630504 [details] [diff] [review]

Review of attachment 630504 [details] [diff] [review]:

This looks good to me, fixes the issue, and doesn't appear to re-open bug 515803.
Comment 3 Florian Quèze [:florian] [:flo] 2012-06-07 07:28:47 PDT
Comment 4 Florian Quèze [:florian] [:flo] 2012-06-12 02:26:19 PDT
Comment on attachment 630504 [details] [diff] [review]

[Approval Request Comment]
I would like us to take this on aurora, but it's mostly a cleanup patch, I don't think anything was visibly broken.
Comment 5 Florian Quèze [:florian] [:flo] 2012-06-15 04:02:34 PDT

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