[OpenLayers-Users] Re: SOLVED - Firefox nsIXMLHttpRequest.send
throwing 0xc1f30001 (NS_ERROR_NOT_INITIALIZED)
flexer
Andrey.Aniskovets at gmail.com
Tue May 10 16:31:00 EDT 2011
I have got the same error (Exception... "Component returned failure code:
0xc1f30001 .... )
And I have found another solution:
Do NOT call "this._object.send(vData);"
if "this._object.abort();" has been called (see XMLHttpRequest.js).
-----------------------
Look at Request.js:
window.setTimeout(function(){
if (request._aborted !== true) {
request.send(config.data);
}
}, 0);
and look at XMLHttpRequest.js :
cXMLHttpRequest.prototype.send = function(vData) {
// Add method sniffer
if (cXMLHttpRequest.onsend)
....
and look at XMLHttpRequest.js:
cXMLHttpRequest.prototype.abort = function() {
....
// BUGFIX: Gecko - unnecessary DONE when aborting
if (this.readyState > cXMLHttpRequest.UNSENT)
this._aborted = true;
this._object.abort();
....
-----------------------
I have added to XMLHttpRequest.js these lines and the problem was solved:
cXMLHttpRequest.prototype.send = function(vData) {
if (!!this._isAbortCalled)
return;
....
cXMLHttpRequest.prototype.abort = function() {
this._isAbortCalled = true;
....
---------------------
I.e.
try { this._object.send(vData); } catch (e) {}
looks like a workaround.
What do you think?
Could you check my changes on your system if it solves your problem?
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/SOLVED-Firefox-nsIXMLHttpRequest-send-throwing-0xc1f30001-NS-ERROR-NOT-INITIALIZED-tp5903108p6349420.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
More information about the Users
mailing list