[Pkg-javascript-commits] [node-async] 331/480: Fix async compatibility with Internet Explorer 10

Jonas Smedegaard js at moszumanska.debian.org
Fri May 2 08:58:39 UTC 2014


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository node-async.

commit b6a1336bcb0865d6d26224f9553b9e1886fe696e
Author: Douglas Christopher Wilson <doug at somethingdoug.com>
Date:   Tue May 21 00:04:25 2013 -0400

    Fix async compatibility with Internet Explorer 10
    
    This fixes async to work on Internet Explorer 10. Internet Explorer 10
    requires that the `setImmediate` function is not called as a method. As
    such, it cannot simply be aliased as `async.setImmediate` and
    `async.nextTick` as `Invalid calling object` error will be encountered
    since `setImmediate` will be called with `this` set to `async`.
---
 lib/async.js | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/lib/async.js b/lib/async.js
index 46f4f50..cb6320d 100755
--- a/lib/async.js
+++ b/lib/async.js
@@ -75,8 +75,11 @@
     //// nextTick implementation with browser-compatible fallback ////
     if (typeof process === 'undefined' || !(process.nextTick)) {
         if (typeof setImmediate === 'function') {
-            async.setImmediate = setImmediate;
-            async.nextTick = setImmediate;
+            async.nextTick = function (fn) {
+                // not a direct alias for IE10 compatibility
+                setImmediate(fn);
+            };
+            async.setImmediate = async.nextTick;
         }
         else {
             async.nextTick = function (fn) {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-async.git



More information about the Pkg-javascript-commits mailing list