summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDebadree Chatterjee <debadree333@gmail.com>2023-02-03 00:37:59 +0530
committerGitHub <noreply@github.com>2023-02-02 19:07:59 +0000
commit75080830a40d4a2a21c858bf594a4810fcfe32b6 (patch)
tree71416fe4560dc82d82c194b8a314c11122579928 /lib
parentf84de0ad4c853eab00bca235ddf82cbdfc580713 (diff)
downloadnode-new-75080830a40d4a2a21c858bf594a4810fcfe32b6.tar.gz
stream: dont access Object.prototype.type during TransformStream init
Fixes: https://github.com/nodejs/node/issues/46355 PR-URL: https://github.com/nodejs/node/pull/46389 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/internal/webstreams/transformstream.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/internal/webstreams/transformstream.js b/lib/internal/webstreams/transformstream.js
index 6e119bde63..4110995529 100644
--- a/lib/internal/webstreams/transformstream.js
+++ b/lib/internal/webstreams/transformstream.js
@@ -358,6 +358,7 @@ function initializeTransformStream(
readableSizeAlgorithm) {
const writable = new WritableStream({
+ __proto__: null,
start() { return startPromise.promise; },
write(chunk) {
return transformStreamDefaultSinkWriteAlgorithm(stream, chunk);
@@ -374,6 +375,7 @@ function initializeTransformStream(
});
const readable = new ReadableStream({
+ __proto__: null,
start() { return startPromise.promise; },
pull() {
return transformStreamDefaultSourcePullAlgorithm(stream);