fails to exit due to updateCurrentBrowser assuming that any focusable element has a blur() method, which is not the case for arbitrary XML with xlink:href set

RESOLVED DUPLICATE of bug 323805

Status

()

Firefox
Tabbed Browser
--
major
RESOLVED DUPLICATE of bug 323805
13 years ago
13 years ago

People

(Reporter: Flummox, Unassigned)

Tracking

({testcase})

Trunk
testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

298 bytes, text/xml
Details
(Reporter)

Description

13 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.1) Gecko/20060124 Firefox/1.5.0.1
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.1) Gecko/20060124 Firefox/1.5.0.1

 

Reproducible: Always

Steps to Reproduce:
1.Open the browser with a web page (not about:blank)
2.Load http://www.aadmm.de/en/dtdform.xml
3.Open a link from this page in a new tab & select tab
  Note - the back/forward arrows affect the first (apparently unfocussed) tab
4.Close the new tab using the close button or File -> Close Tab
5.Try to close the browser using File -> Quit
Actual Results:  
The browser will not close
The Javascript console shows - 

Error: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMXULElement.boxObject]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: chrome://global/content/bindings/browser.xml :: get_docShell :: line 0"  data: no]


Right clicking on the tab and selecting Close Tab will not show the exception or the Quit problem.
The Browser can be closed using the close button.

Comment 1

13 years ago
Maybe related to bug 289035 or Suite bug 317820 (same error message/Close Tab)?
(Reporter)

Comment 2

13 years ago
Created attachment 209960 [details]
Testcase

1.Open testcase.
2.Click link then click back.
  (or right-click link & then close menu - this does not show the focus problem).
3.Open new tab & close (do not right-click -> Close tab).
4.Try to close browser.
(Reporter)

Comment 3

13 years ago
(In reply to comment #2)
> Created an attachment (id=209960) [edit]
> Testcase
> 
> 1.Open testcase.
> 2.Click link then click back.
>   (or right-click link & then close menu - this does not show the focus
> problem).
> 3.Open new tab & close (do not right-click -> Close tab).
> 4.Try to close browser.
> 

Version: unspecified → 1.5 Branch

Comment 4

13 years ago
Reproducible with the attached testcase and Firefox 1.5.0.1 RC1/20060111, File > Close and Alt+F4 close Firefox as expected.

Comment 5

13 years ago
I can also reproduce on trunk after applying a fix to bug 324946.

The browser doesn't quit because (only (1) is relevant to the bug, the rest is for the curious):
1) this call fails when creating a new tab, because the focused element doesn't have a blur() method.
http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/toolkit/content/widgets/tabbrowser.xml&rev=1.129#656
(note that there's also a focus() call later there)
2) exception is thrown, so updateCurrentBrowser doesn't finish executing; mCurrentTab doesn't get updated
3) when you close the tab, a wrong tab (#1) is passed to removeTab(). However due to this code:
http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/toolkit/content/widgets/tabbrowser.xml&rev=1.129#1299
the correct (#2) <browser/> is removed from the tree. So after removeTab() tab #1 and browser #2 are removed from tree
4) when you try to quit, |WindowIsClosing| in browser.js causes an exception at this line:
http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/browser/base/content/browser.js&rev=1.555#5648
Because the only tab in the tab strip is the former tab #2, and the browser for that tab is no longer in the tree.

As goQuitApplication doesn't handle this exception, quit doesn't happen.
Component: General → Tabbed Browser
OS: Linux → All
QA Contact: general → tabbed.browser
Hardware: PC → All
Version: 1.5 Branch → Trunk

Comment 6

13 years ago
No duplicates found, confirming.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: testcase
Summary: Browser Fails to Quit & Focus is Confused - uncaught exception NS_ERROR_FAILURE → fails to exit due to updateCurrentBrowser assuming that any focusable element has a blur() method, which is not the case for arbitrary XML with xlink:href set

*** This bug has been marked as a duplicate of 323805 ***
Status: NEW → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.