posix.cat not using call() correctly
authorJonas Pfenniger <jonas@pfenniger.name>
Tue, 22 Dec 2009 13:52:40 +0000 (14:52 +0100)
committerRyan Dahl <ry@tinyclouds.org>
Tue, 22 Dec 2009 17:01:13 +0000 (18:01 +0100)
'this' will point to "arguments" and the arguments of the callback itself
will not be set.

src/node.js

index 69416d0ebb3169d3db84f5da8655aceb71c99a63..d8acce40b407ee4513381b15ca71c32e1c4efef7 100644 (file)
@@ -651,7 +651,7 @@ var posixModule = createInternalModule("posix", function (exports) {
             exports.close(fd);
           }
         }).addErrback(function () {
-          promise.emitError.call(arguments);
+          promise.emitError.apply(promise, arguments);
         });
       }
       readChunk();