[Pkg-javascript-commits] [sockjs-client] 206/350: Remove process.nextTick
tonnerre at ancient-solutions.com
tonnerre at ancient-solutions.com
Fri Aug 5 01:04:22 UTC 2016
This is an automated email from the git hooks/post-receive script.
tonnerre-guest pushed a commit to branch upstream
in repository sockjs-client.
commit 082f803296fcc8c788ee62702a3e3a80de272e88
Author: Bryce Kahle <bkahle at gmail.com>
Date: Mon Oct 20 17:54:12 2014 -0400
Remove process.nextTick
---
lib/info-receiver.js | 4 ++--
lib/main.js | 4 ++--
lib/transport/sender/xdr.js | 4 ++--
lib/transport/sender/xhr-cors.js | 4 ++--
lib/transport/sender/xhr-local.js | 4 ++--
lib/utils/event.js | 2 +-
6 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/lib/info-receiver.js b/lib/info-receiver.js
index f8bb9f0..86a0164 100644
--- a/lib/info-receiver.js
+++ b/lib/info-receiver.js
@@ -21,9 +21,9 @@ function InfoReceiver(baseUrl, urlInfo) {
var self = this;
EventEmitter.call(this);
- process.nextTick(function() {
+ setTimeout(function() {
self.doXhr(baseUrl, urlInfo);
- });
+ }, 0);
}
inherits(InfoReceiver, EventEmitter);
diff --git a/lib/main.js b/lib/main.js
index cd8dd27..3998d52 100644
--- a/lib/main.js
+++ b/lib/main.js
@@ -314,7 +314,7 @@ SockJS.prototype._close = function(code, reason, wasClean) {
}
this.readyState = SockJS.CLOSING;
- process.nextTick(function() {
+ setTimeout(function() {
this.readyState = SockJS.CLOSED;
if (forceFail) {
@@ -329,7 +329,7 @@ SockJS.prototype._close = function(code, reason, wasClean) {
this.dispatchEvent(e);
this.onmessage = this.onclose = this.onerror = null;
debug('disconnected');
- }.bind(this));
+ }.bind(this), 0);
};
// See: http://www.erg.abdn.ac.uk/~gerrit/dccp/notes/ccid2/rto_estimator/
diff --git a/lib/transport/sender/xdr.js b/lib/transport/sender/xdr.js
index 36a3002..fb0da16 100644
--- a/lib/transport/sender/xdr.js
+++ b/lib/transport/sender/xdr.js
@@ -20,9 +20,9 @@ function XDRObject(method, url, payload) {
var self = this;
EventEmitter.call(this);
- process.nextTick(function() {
+ setTimeout(function() {
self._start(method, url, payload);
- });
+ }, 0);
}
inherits(XDRObject, EventEmitter);
diff --git a/lib/transport/sender/xhr-cors.js b/lib/transport/sender/xhr-cors.js
index e5feac1..9c3b95d 100644
--- a/lib/transport/sender/xhr-cors.js
+++ b/lib/transport/sender/xhr-cors.js
@@ -6,9 +6,9 @@ var inherits = require('inherits')
function XHRCorsObject(method, url, payload, opts) {
var self = this;
- process.nextTick(function() {
+ setTimeout(function() {
XhrDriver.call(self, method, url, payload, opts);
- });
+ }, 0);
}
inherits(XHRCorsObject, XhrDriver);
diff --git a/lib/transport/sender/xhr-local.js b/lib/transport/sender/xhr-local.js
index 100bbaf..372869b 100644
--- a/lib/transport/sender/xhr-local.js
+++ b/lib/transport/sender/xhr-local.js
@@ -6,11 +6,11 @@ var inherits = require('inherits')
function XHRLocalObject(method, url, payload /*, opts */) {
var self = this;
- process.nextTick(function() {
+ setTimeout(function() {
XhrDriver.call(self, method, url, payload, {
noCredentials: true
});
- });
+ }, 0);
}
inherits(XHRLocalObject, XhrDriver);
diff --git a/lib/utils/event.js b/lib/utils/event.js
index 6c3b93a..e673cfc 100644
--- a/lib/utils/event.js
+++ b/lib/utils/event.js
@@ -33,7 +33,7 @@ module.exports = {
var ref = random.string(8);
onUnload[ref] = listener;
if (afterUnload) {
- process.nextTick(this.triggerUnloadCallbacks);
+ setTimeout(this.triggerUnloadCallbacks, 0);
}
return ref;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/sockjs-client.git
More information about the Pkg-javascript-commits
mailing list