diff options
Diffstat (limited to 'lib/_http_incoming.js')
-rw-r--r-- | lib/_http_incoming.js | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/_http_incoming.js b/lib/_http_incoming.js index 36d81153fe..bc04e8779f 100644 --- a/lib/_http_incoming.js +++ b/lib/_http_incoming.js @@ -21,7 +21,10 @@ 'use strict'; -const { Object } = primordials; +const { + ObjectDefineProperty, + ObjectSetPrototypeOf, +} = primordials; const Stream = require('stream'); @@ -80,10 +83,10 @@ function IncomingMessage(socket) { // read by the user, so there's no point continuing to handle it. this._dumped = false; } -Object.setPrototypeOf(IncomingMessage.prototype, Stream.Readable.prototype); -Object.setPrototypeOf(IncomingMessage, Stream.Readable); +ObjectSetPrototypeOf(IncomingMessage.prototype, Stream.Readable.prototype); +ObjectSetPrototypeOf(IncomingMessage, Stream.Readable); -Object.defineProperty(IncomingMessage.prototype, 'connection', { +ObjectDefineProperty(IncomingMessage.prototype, 'connection', { get: function() { return this.socket; }, |