From ab71cf8e47791747145e544515061e8403af0acb Mon Sep 17 00:00:00 2001 From: voltrexmaster Date: Tue, 26 Oct 2021 21:12:44 -0700 Subject: [PATCH] webstreams: rename unknown primordial The primordials does not expose a primordial called `DataViewCtor`, leading up to a non-existent constructor. Fixes: https://github.com/nodejs/node/issues/40612 --- 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 fe9b26b991f04ef..9ba5ee0e0a86127 100644 --- a/lib/internal/webstreams/readablestream.js +++ b/lib/internal/webstreams/readablestream.js @@ -7,7 +7,7 @@ const { ArrayBufferPrototypeSlice, ArrayPrototypePush, ArrayPrototypeShift, - DataViewCtor, + DataViewPrototypeConstructor, FunctionPrototypeBind, FunctionPrototypeCall, MathMin, @@ -2100,7 +2100,7 @@ function readableByteStreamControllerPullInto( pendingPullIntos, } = controller[kState]; let elementSize = 1; - let ctor = DataViewCtor; + let ctor = DataViewPrototypeConstructor; if (isArrayBufferView(view) && !isDataView(view)) { elementSize = view.constructor.BYTES_PER_ELEMENT; ctor = view.constructor;