From 4ad8e5a7cc6b537a9f646d284ff27f1acde4c0b0 Mon Sep 17 00:00:00 2001 From: Brian White Date: Mon, 15 Feb 2016 04:45:20 -0500 Subject: [PATCH 1/3] src: remove unnecessary check The value's type is unsigned so it will always be >= 0. --- src/env-inl.h | 1 - 1 file changed, 1 deletion(-) diff --git a/src/env-inl.h b/src/env-inl.h index e1856d81b0060a..475e8e83f594e6 100644 --- a/src/env-inl.h +++ b/src/env-inl.h @@ -108,7 +108,6 @@ inline Environment::AsyncCallbackScope::AsyncCallbackScope(Environment* env) inline Environment::AsyncCallbackScope::~AsyncCallbackScope() { env_->makecallback_cntr_--; - CHECK_GE(env_->makecallback_cntr_, 0); } inline bool Environment::AsyncCallbackScope::in_makecallback() { From 5875b0cc5a056486e819b133ae8e2a9345e94a58 Mon Sep 17 00:00:00 2001 From: Brian White Date: Mon, 15 Feb 2016 04:47:06 -0500 Subject: [PATCH 2/3] http: remove unnecessary check The value passed to `process.nextTick()` which is passed to the callback is already a valid object, so the conditional will always evaluate to true. --- lib/_http_outgoing.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/_http_outgoing.js b/lib/_http_outgoing.js index 56228f5139c80a..ec5e078412768b 100644 --- a/lib/_http_outgoing.js +++ b/lib/_http_outgoing.js @@ -489,8 +489,7 @@ function writeAfterEndNT(self, err, callback) { function connectionCorkNT(conn) { - if (conn) - conn.uncork(); + conn.uncork(); } From 6da8293edd4b7038bd2afca3345344115fca737e Mon Sep 17 00:00:00 2001 From: Brian White Date: Mon, 15 Feb 2016 04:51:05 -0500 Subject: [PATCH 3/3] http: remove old, confusing comment The comment refers to a property (called `_pendings`) that no longer exists. --- lib/_http_incoming.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/_http_incoming.js b/lib/_http_incoming.js index 581f62f129f120..6e66ae6d42a9c0 100644 --- a/lib/_http_incoming.js +++ b/lib/_http_incoming.js @@ -20,10 +20,6 @@ exports.readStop = readStop; function IncomingMessage(socket) { Stream.Readable.call(this); - // XXX This implementation is kind of all over the place - // When the parser emits body chunks, they go in this list. - // _read() pulls them out, and when it finds EOF, it ends. - this.socket = socket; this.connection = socket;