Closed Bug 295484 Opened 20 years ago Closed 17 years ago

Exception in XMLHTTPRequest (nsIXMLHttpRequest.open) when made via Macromedia Flash DoFSCommand javascript call

Categories

(SeaMonkey :: UI Design, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: rhalin, Assigned: jag+mozilla)

References

()

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20031007
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20031007

When a flash object calls the DoFSCommand function, if it creates an
XMLHTTPRequest object, the object will fail calling the .open method, with error:

Error: [Exception... "Component returned failure code: 0x80004005
(NS_ERROR_FAILURE) [nsIXMLHttpRequest.open]"  nsresult: "0x80004005
(NS_ERROR_FAILURE)"  location: "JS frame ::
http://www.dreamfoundry.sytes.net/dsf2/broken_example.html :: loadXMLDoc :: line
64"  data: no]

Reproducible: Always

Steps to Reproduce:
1. Create a webpage with Flash that calls the javascript DoFSCommand
2. Have DoFSCommand call a function that creates an XMLHTTPRequest object
3. Use the object and attempt to retrieve a valid XML object using the open method

Actual Results:  
.open method fails, and the javascript terminates immediately on the line that
calls .open

Expected Results:  
Should have attempted to retrieve the XML object, and proceed processing javascript.

I'm aware this is a slightly dated version of Mozilla, but the bug (effect)
still occures on a much more recent version of Firefox on a seperate computer in
the office.

I found a fix for this bug by having the javascript that creates the
xmlhttprequest object be called later using settimeout.

Function before:
function Menu2_DoFSCommand(command, args) {
	var Menu2Obj = isInternetExplorer ? document.all.Menu2 : document.Menu2;
	if(command == "changePage")
	{
	  loadXMLDoc(args + ".xml");
	}
}
Function after:
function Menu2_DoFSCommand(command, args) {
	var Menu2Obj = isInternetExplorer ? document.all.Menu2 : document.Menu2;
	if(command == "changePage")
	{
	    setTimeout('loadXMLDoc("' + args + ".xml" + '")',1);
	}
}
Blocks: 295553
So... I don't see a JS exception being thrown at
http://www.dreamfoundry.sytes.net/dsf2/broken_example.html.  Does that site
still show the problem?
J Rhalin Lothian:
Link http://www.dreamfoundry.sytes.net/dsf2/broken_example.html not exists.
Is this still a valid bug?
I still had the test file around on another machine.  I've checked it and it seems to work fine now.  Somewhere along the line this must have been fixed.  I'll close off the ticket.
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.