From c4a6f9ab94e3d6d8ded2424c61aea1299668f1c9 Mon Sep 17 00:00:00 2001 From: voltrexmaster Date: Tue, 26 Oct 2021 21:12:44 -0700 Subject: [PATCH] stream: rename unknown primordial MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The primordials does not expose a primordial called `DataViewCtor`, leading up to a non-existent constructor. Fixes: https://github.com/nodejs/node/issues/40612 PR-URL: https://github.com/nodejs/node/pull/40622 Reviewed-By: James M Snell Reviewed-By: Tobias Nießen Reviewed-By: Minwoo Jung Reviewed-By: Antoine du Hamel --- lib/internal/webstreams/readablestream.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/internal/webstreams/readablestream.js b/lib/internal/webstreams/readablestream.js index e661fc23894024..bb1bbf947b4e0b 100644 --- a/lib/internal/webstreams/readablestream.js +++ b/lib/internal/webstreams/readablestream.js @@ -7,7 +7,7 @@ const { ArrayBufferPrototypeSlice, ArrayPrototypePush, ArrayPrototypeShift, - DataViewCtor, + DataView, FunctionPrototypeBind, FunctionPrototypeCall, MathMin, @@ -2132,7 +2132,7 @@ function readableByteStreamControllerPullInto( pendingPullIntos, } = controller[kState]; let elementSize = 1; - let ctor = DataViewCtor; + let ctor = DataView; if (isArrayBufferView(view) && !isDataView(view)) { elementSize = view.constructor.BYTES_PER_ELEMENT; ctor = view.constructor;