diff options
Diffstat (limited to 'lib/https.js')
-rw-r--r-- | lib/https.js | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/lib/https.js b/lib/https.js index 6d799d0c92..d8383a0305 100644 --- a/lib/https.js +++ b/lib/https.js @@ -21,7 +21,10 @@ 'use strict'; -const { Object } = primordials; +const { + ObjectAssign, + ObjectSetPrototypeOf, +} = primordials; require('internal/util').assertCrypto(); @@ -76,8 +79,8 @@ function Server(opts, requestListener) { this.maxHeadersCount = null; this.headersTimeout = 40 * 1000; // 40 seconds } -Object.setPrototypeOf(Server.prototype, tls.Server.prototype); -Object.setPrototypeOf(Server, tls.Server); +ObjectSetPrototypeOf(Server.prototype, tls.Server.prototype); +ObjectSetPrototypeOf(Server, tls.Server); Server.prototype.setTimeout = HttpServer.prototype.setTimeout; @@ -153,8 +156,8 @@ function Agent(options) { list: [] }; } -Object.setPrototypeOf(Agent.prototype, HttpAgent.prototype); -Object.setPrototypeOf(Agent, HttpAgent); +ObjectSetPrototypeOf(Agent.prototype, HttpAgent.prototype); +ObjectSetPrototypeOf(Agent, HttpAgent); Agent.prototype.createConnection = createConnection; Agent.prototype.getName = function getName(options) { @@ -296,7 +299,7 @@ function request(...args) { } if (args[0] && typeof args[0] !== 'function') { - Object.assign(options, args.shift()); + ObjectAssign(options, args.shift()); } options._defaultAgent = module.exports.globalAgent; |