diff options
author | Michaël Zasso <targos@protonmail.com> | 2019-11-22 18:04:46 +0100 |
---|---|---|
committer | Michaël Zasso <targos@protonmail.com> | 2019-11-25 10:28:15 +0100 |
commit | 0646eda4fc0affb98e13c30acb522e63b7fd6dde (patch) | |
tree | 078209f50b044e24ea2c72cbbe7dca6e34bb7e25 /lib/_http_common.js | |
parent | 35c6e0cc2b56a5380e6808ef5603ecc2b167e032 (diff) | |
download | android-node-v8-0646eda4fc0affb98e13c30acb522e63b7fd6dde.tar.gz android-node-v8-0646eda4fc0affb98e13c30acb522e63b7fd6dde.tar.bz2 android-node-v8-0646eda4fc0affb98e13c30acb522e63b7fd6dde.zip |
lib: flatten access to primordials
Store all primordials as properties of the primordials object.
Static functions are prefixed by the constructor's name and prototype
methods are prefixed by the constructor's name followed by "Prototype".
For example: primordials.Object.keys becomes primordials.ObjectKeys.
PR-URL: https://github.com/nodejs/node/pull/30610
Refs: https://github.com/nodejs/node/issues/29766
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Diffstat (limited to 'lib/_http_common.js')
-rw-r--r-- | lib/_http_common.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/_http_common.js b/lib/_http_common.js index 8c88a90568..d0f07d3b69 100644 --- a/lib/_http_common.js +++ b/lib/_http_common.js @@ -21,7 +21,9 @@ 'use strict'; -const { Math } = primordials; +const { + MathMin, +} = primordials; const { setImmediate } = require('timers'); const { methods, HTTPParser } = internalBinding('http_parser'); @@ -95,7 +97,7 @@ function parserOnHeadersComplete(versionMajor, versionMinor, headers, method, // If parser.maxHeaderPairs <= 0 assume that there's no limit. if (parser.maxHeaderPairs > 0) - n = Math.min(n, parser.maxHeaderPairs); + n = MathMin(n, parser.maxHeaderPairs); incoming._addHeaderLines(headers, n); |