Closed Bug 705617 Opened 12 years ago Closed 6 years ago

Never-ending synchronous XMLHttpRequest on unload and beforeunload freezes down Firefox


(Core :: DOM: Core & HTML, defect)

8 Branch
Not set





(Reporter: azazel.private, Unassigned)


(Blocks 1 open bug)


(Keywords: hang, testcase, Whiteboard: [Snappy])


(1 file)

1.89 KB, application/java-archive
Attached file
User Agent: Opera/9.80 (Macintosh; Intel Mac OS X 10.6.8; U; ru) Presto/2.9.168 Version/11.52

Steps to reproduce:

1. Add event listener to unload and beforeunload with never endind synchronous XMLHttpRequest (on server side: setTimeout(function () {res.end();}, 36565656)).
2. Close or refresh page
3. Tab freeses
4. Press [X] close tab and tab closes, but...

Actual results:

Firefox freeses down (impossible to create a tab on navigate to any page)

Expected results:

After I press [X] second time Firefox should abort any synchronous XHMHttpRequest with any exception or state=0

Archive with test files is attached
Component: General → DOM
Product: Firefox → Core
QA Contact: general → general
I came across this today.

I think this is a regression. In firefox 3.6 (onbeforeunload) the tab simply stays open until the request was done. However if the user pressed the close button again, the request would be aborted and the tab would close.
I am not sure at what specific version this changed.
16.0.2 and 17.0.1 are still affected. I cant close that tab (2+ clicks on X). There is more - I cant crate a new tab and I cant even close firefox.
Keywords: hang, testcase
Summary: Never endind synchronous XMLHttpRequest on unload and beforeunload freeses down Firefox → Never-ending synchronous XMLHttpRequest on unload and beforeunload freezes down Firefox
Related to bug 767102?
Blocks: eviltraps
Whiteboard: [Snappy]
I can't reproduce the problem with the attached zip file. Firefox 24 release with Win8 x64. Any other testcase?
I still can reproduce this bug in Firefox 24 release for Mac, using the same steps.
See Also: → 1307122
Attachment #577204 - Attachment mime type: application/octet-stream → application/java-archive
This works for me--you can successfully close the trap page's tab. Probably fixed by the timeout added in bug 1307122?
Closed: 6 years ago
Resolution: --- → WORKSFORME
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.