mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bug 441446: set mozBackgroundRequest on XMPP request object when created rather than when used, since it only needs to be set once
This commit is contained in:
parent
b969583294
commit
8dcf0279c4
@ -177,11 +177,11 @@ HTTPPollingTransport.prototype = {
|
||||
this._retryCap = 0;
|
||||
},
|
||||
|
||||
__request: null,
|
||||
get _request() {
|
||||
if (!this.__request)
|
||||
this.__request = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"].createInstance( Ci.nsIXMLHttpRequest );
|
||||
return this.__request;
|
||||
let request = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"].createInstance( Ci.nsIXMLHttpRequest );
|
||||
request.mozBackgroundRequest = true;
|
||||
this.__defineGetter__("_request", function() request);
|
||||
return this._request;
|
||||
},
|
||||
|
||||
__hasher: null,
|
||||
@ -256,7 +256,6 @@ HTTPPollingTransport.prototype = {
|
||||
|
||||
_doPost: function( requestXml ) {
|
||||
var request = this._request;
|
||||
request.mozBackgroundRequest = true;
|
||||
var callbackObj = this._callbackObject;
|
||||
var self = this;
|
||||
var contents = "";
|
||||
|
Loading…
Reference in New Issue
Block a user