diff options
author | Anatoli Papirovski <apapirovski@mac.com> | 2017-09-21 14:52:09 -0400 |
---|---|---|
committer | Ruben Bridgewater <ruben@bridgewater.de> | 2017-09-24 12:57:35 -0300 |
commit | 33760ccc18e4be10cce3d39f59d374881c49ee2e (patch) | |
tree | db36fa02d8bccaef7fd9f28baf7cf0059cbd3c96 /lib | |
parent | b2eb98721e54904a4de02bf8b040f3c81793bda0 (diff) | |
download | android-node-v8-33760ccc18e4be10cce3d39f59d374881c49ee2e.tar.gz android-node-v8-33760ccc18e4be10cce3d39f59d374881c49ee2e.tar.bz2 android-node-v8-33760ccc18e4be10cce3d39f59d374881c49ee2e.zip |
http2: remove unused onTimeout, add timeout tests
Remove unused onTimeout on Http2Session and Http2Stream because
the correct _onTimeout is already declared and in use. Expand
timeout tests to handle edge cases and additional arguments.
PR-URL: https://github.com/nodejs/node/pull/15539
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/internal/http2/core.js | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/lib/internal/http2/core.js b/lib/internal/http2/core.js index 0ea3ca75f4..bc41cd4bf9 100644 --- a/lib/internal/http2/core.js +++ b/lib/internal/http2/core.js @@ -2138,23 +2138,8 @@ const setTimeout = { return this; } }; - -const onTimeout = { - configurable: false, - enumerable: false, - value: function() { - process.nextTick(emit.bind(this, 'timeout')); - } -}; - -Object.defineProperties(Http2Stream.prototype, { - setTimeout, - onTimeout -}); -Object.defineProperties(Http2Session.prototype, { - setTimeout, - onTimeout -}); +Object.defineProperty(Http2Stream.prototype, 'setTimeout', setTimeout); +Object.defineProperty(Http2Session.prototype, 'setTimeout', setTimeout); // -------------------------------------------------------------------- |