summaryrefslogtreecommitdiff
path: root/lib/internal/streams/lazy_transform.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/internal/streams/lazy_transform.js')
-rw-r--r--lib/internal/streams/lazy_transform.js14
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/internal/streams/lazy_transform.js b/lib/internal/streams/lazy_transform.js
index 0036bf306c..6584159095 100644
--- a/lib/internal/streams/lazy_transform.js
+++ b/lib/internal/streams/lazy_transform.js
@@ -3,7 +3,11 @@
// for the stream, one conventional and one non-conventional.
'use strict';
-const { Object } = primordials;
+const {
+ ObjectDefineProperties,
+ ObjectDefineProperty,
+ ObjectSetPrototypeOf,
+} = primordials;
const stream = require('stream');
@@ -18,8 +22,8 @@ function LazyTransform(options) {
this.writable = true;
this.readable = true;
}
-Object.setPrototypeOf(LazyTransform.prototype, stream.Transform.prototype);
-Object.setPrototypeOf(LazyTransform, stream.Transform);
+ObjectSetPrototypeOf(LazyTransform.prototype, stream.Transform.prototype);
+ObjectSetPrototypeOf(LazyTransform, stream.Transform);
function makeGetter(name) {
return function() {
@@ -36,7 +40,7 @@ function makeGetter(name) {
function makeSetter(name) {
return function(val) {
- Object.defineProperty(this, name, {
+ ObjectDefineProperty(this, name, {
value: val,
enumerable: true,
configurable: true,
@@ -45,7 +49,7 @@ function makeSetter(name) {
};
}
-Object.defineProperties(LazyTransform.prototype, {
+ObjectDefineProperties(LazyTransform.prototype, {
_readableState: {
get: makeGetter('_readableState'),
set: makeSetter('_readableState'),