Closed Bug 342796 Opened 19 years ago Closed 17 years ago

XMLHttpRequest attaches to the wrong load group

Categories

(Core :: XML, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 383430

People

(Reporter: jwkbugzilla, Unassigned)

Details

The problematic scenario: 1. An extension window is opened to query some request parameters 2. When the user presses OK the window calls a JavaScript component that creates an XMLHttpRequest 3. The window closes - and the request is aborted even though it is owned by the component and doesn't depend on the window in any way XMLHttpRequest determines the load group it should attach to via current scripting context. It seems that in this case it gets the load group of the calling window - which it shouldn't.
Forgot to mention: I tested it in a Firefox trunk nightly (build 2006062607) and Firefox 1.5.0.4.
Bug 338546 is a duplicate with testcase.
No, I don't think it is a duplicate. Bug 338546 is about web pages - and it is certainly not sure that a web page should be able to deal with an XMLHttpRequest that was initiated by another web page. For extensions this isn't a question, there is no reason for XMLHttpRequest to abort when an extension window was closed.
The simple workaround is doing |request.channel.loadGroup = null| after calling open(). The only reason why I don't think this bug should be resolved WONTFIX is that this "feature" is so entirely non-obvious. Your XMLHttpRequest appears to be failing without a reason, and finding out the cause is anything but trivial.
Resolving as duplicate - bug 383430 already fixed this.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.