From 5d204b2879c8eb1cd98e7713db8a26905fbc6cfd Mon Sep 17 00:00:00 2001 From: Milian Wolff Date: Mon, 11 Aug 2014 13:43:38 +0200 Subject: Get rid of setTimeout calls in qwebchannel.js client code. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This was a historic artefact which should not be required anymore. Back then it was added when trying to improve the perceived performance of the webchannel on an embedded device. Nowadays, using the built-in WebKit IPC mechanism instead of WebSockets, paired with the rest of the code cleanup and other changes, it should not be required anymore. Change-Id: I4b2d76d84aaf92e12592a0b2bcf94710b697846e Reviewed-by: Lutz Schönemann Reviewed-by: Simon Hausmann --- src/webchannel/qwebchannel.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/webchannel/qwebchannel.js b/src/webchannel/qwebchannel.js index 2df8704..4b031c0 100644 --- a/src/webchannel/qwebchannel.js +++ b/src/webchannel/qwebchannel.js @@ -154,7 +154,7 @@ var QWebChannel = function(transport, initCallback) console.warn("Unhandled property update: " + data.object + "::" + data.signal); } } - setTimeout(function() { channel.exec({type: QWebChannelMessageTypes.idle}); }, 0); + channel.exec({type: QWebChannelMessageTypes.idle}); } // prevent multiple initialization which might happen with multiple webchannel clients. @@ -172,7 +172,7 @@ var QWebChannel = function(transport, initCallback) if (initCallback) { initCallback(channel); } - setTimeout(function() { channel.exec({type: QWebChannelMessageTypes.idle}); }, 0); + channel.exec({type: QWebChannelMessageTypes.idle}); } this.debug = function(message) -- cgit v1.2.1