On Tuesday, May 10, 2011, flexer <[email protected]> wrote: > 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?
Hi Is the problem reproducible on one of the OpenLayers examples? (http://www.openlayers.org/dev/examples) What version of OpenLayers do you use? Do you have the problem with OpenLayers trunk? XMLHttpRequest.js already includes a state variable to know if abort() has been called, namely _aborted. But abort() sets _aborted to true only if the XHR status is greater than UNSET. Could you try to have abort() unconditionally set _aborted to true and see if that fixes it? Thanks. -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : [email protected] http://www.camptocamp.com _______________________________________________ Users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/openlayers-users
