Closed
Bug 338546
Opened 20 years ago
Closed 9 years ago
Impossible to get XMLHttpRequest response data in the opening window when the request was initiated from a popup that has been closed.
Categories
(DevTools :: Netmonitor, defect, P3)
Tracking
(Not tracked)
RESOLVED
WORKSFORME
People
(Reporter: felix, Unassigned)
Details
Attachments
(3 files)
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3
Ok What I am doing is sending out a asyncronous xmlhttprequest from a popup. I set the onreadystatechange method to be a method in the opener of the popup window. Then the popup is closed. Even though the xmlhttprequest object belongs to the opener window it does not function anymore. On the other hand if the popup is kept open the functionality does not break.
Reproducible: Always
Steps to Reproduce:
Try out the sample html. It consists of 3 files.
1. ajax.html This is the opener window.
2. popup.html This is the window that is opened from ajax.html
3. response.html this is just what i use for the xml response.
If you put all 3 files on a working server should be no problem to reproduce.
Notitce that If you clikc the Send request and dont close the text in the opener gets populated with the response. If you clikc Send request and close popup then there is no response what so ever it is simply blank. There is no errors generated in the javascript console.
Additional test files are provided.
| Reporter | ||
Comment 1•20 years ago
|
||
| Reporter | ||
Comment 2•20 years ago
|
||
| Reporter | ||
Comment 3•20 years ago
|
||
Updated•17 years ago
|
Assignee: xml → nobody
QA Contact: ashshbhatt → xml
Comment 4•9 years ago
|
||
The attached test-case is working fine for me in today's nightly... unless I have the devtools network panel open. Then the tab crashes with this stack trace:
>Handler function NetworkEventActorProxy.addResponseContent threw an exception: [Exception... "Component returned failure code: 0xc1f30001 (NS_ERROR_NOT_INITIALIZED) [nsIMessageSender.sendAsyncMessage]" nsresult: "0xc1f30001 (NS_ERROR_NOT_INITIALIZED)" location: "JS frame :: resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/webconsole/network-monitor.js :: NetworkEventActorProxy.methodFactory/< :: line 1587" data: no]
>Stack: NetworkEventActorProxy.methodFactory/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/webconsole/network-monitor.js:1587:5
>exports.makeInfallible/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/ThreadSafeDevToolsUtils.js:101:14
>NetworkResponseListener.prototype._onComplete@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/webconsole/network-monitor.js:555:5
>NetworkResponseListener.prototype.onStreamClose@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/webconsole/network-monitor.js:504:7
>NetworkResponseListener.prototype.onInputStreamReady@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/webconsole/network-monitor.js:606:7
>Line: 1587, column: 0
>console.error:
> Handler function NetworkEventActorProxy.addResponseContent threw an exception: [Exception... "Component returned failure code: 0xc1f30001 (NS_ERROR_NOT_INITIALIZED) [nsIMessageSender.sendAsyncMessage]" nsresult: "0xc1f30001 (NS_ERROR_NOT_INITIALIZED)" location: "JS frame :: resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/webconsole/network-monitor.js :: NetworkEventActorProxy.methodFactory/< :: line 1587" data: no]
>Stack: NetworkEventActorProxy.methodFactory/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/webconsole/network-monitor.js:1587:5
>exports.makeInfallible/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/ThreadSafeDevToolsUtils.js:101:14
>NetworkResponseListener.prototype._onComplete@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/webconsole/network-monitor.js:555:5
>NetworkResponseListener.prototype.onStreamClose@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/webconsole/network-monitor.js:504:7
>NetworkResponseListener.prototype.onInputStreamReady@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/webconsole/network-monitor.js:606:7
>Line: 1587, column: 0
The network panel in Firefox 48 does not crash this way, however.
Viktor, I'm not sure if this warrants a new bug, or just re-purposing this one?
Flags: needinfo?(vporof)
Comment 5•9 years ago
|
||
Victor seems inactive on bugzilla, redirecting to Honza.
Flags: needinfo?(vporof) → needinfo?(odvarko)
Updated•9 years ago
|
Component: XML → Developer Tools: Netmonitor
Flags: needinfo?(odvarko)
Product: Core → Firefox
Comment 6•9 years ago
|
||
I can't reproduce the problem on my machine.
Here is what I am doing:
1) Load ajax.html, open DevTools Toolbox and select the Network panel
2) Click 'open popup' link -> New browser tab is opened.
3) Click 'send request and DON'T close popup.' and 'send request and close popup.'
4) Go back to the ajax.html browser tab (done automatically since the 'popup.html' has closed)
5) I am seeing two requests (in ajax.html browser tab) and both of them has a response set to 'This is the response'
What am I doing wrong?
Honza
Priority: -- → P3
Comment 7•9 years ago
|
||
I don't think you did anything wrong, Honza, as those are the same steps I was using. It seems the bug has just been fixed since I last tried this. Thanks!
Status: UNCONFIRMED → RESOLVED
Closed: 9 years ago
Resolution: --- → WORKSFORME
Comment 8•9 years ago
|
||
Great, thanks for the update!
Honza
Updated•8 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•