diff --git a/lib/internal/webstreams/transformstream.js b/lib/internal/webstreams/transformstream.js index 6e119bde63bb2f..991033ea8423a3 100644 --- a/lib/internal/webstreams/transformstream.js +++ b/lib/internal/webstreams/transformstream.js @@ -368,6 +368,7 @@ function initializeTransformStream( close() { return transformStreamDefaultSinkCloseAlgorithm(stream); }, + __proto__: null }, { highWaterMark: writableHighWaterMark, size: writableSizeAlgorithm, @@ -382,6 +383,7 @@ function initializeTransformStream( transformStreamErrorWritableAndUnblockWrite(stream, reason); return PromiseResolve(); }, + __proto__: null, }, { highWaterMark: readableHighWaterMark, size: readableSizeAlgorithm, diff --git a/test/parallel/test-whatwg-transformstream.js b/test/parallel/test-whatwg-transformstream.js index 0cbc76cc4ce8c0..b8779152c7e68b 100644 --- a/test/parallel/test-whatwg-transformstream.js +++ b/test/parallel/test-whatwg-transformstream.js @@ -186,3 +186,18 @@ class Source { inspect(controller, { depth: 0 }), /TransformStreamDefaultController \[/); } + +{ + Object.defineProperty(Object.prototype, 'type', { + get: common.mustNotCall() + }); + + new TransformStream({ + transform(chunk, controller) { + controller.enqueue(chunk); + }, + flush(controller) { + controller.terminate(); + } + }); +}