GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — stream: use validateBuffer for BYOB reader view · nodejs/node@374f7e2

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • lib/internal/webstreams
    • readablestream.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎lib/internal/webstreams/readablestream.js‎

Copy file name to clipboardExpand all lines: lib/internal/webstreams/readablestream.js
+1-11Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1060,17 +1060,7 @@ class ReadableStreamBYOBReader {
10601060
async read(view, options = kEmptyObject) {
10611061
if (!isReadableStreamBYOBReader(this))
10621062
throw new ERR_INVALID_THIS('ReadableStreamBYOBReader');
1063-
if (!isArrayBufferView(view)) {
1064-
throw new ERR_INVALID_ARG_TYPE(
1065-
'view',
1066-
[
1067-
'Buffer',
1068-
'TypedArray',
1069-
'DataView',
1070-
],
1071-
view,
1072-
);
1073-
}
1063+
validateBuffer(view, 'view');
10741064
validateObject(options, 'options', kValidateObjectAllowObjectsAndNull);
10751065

10761066
const viewByteLength = ArrayBufferViewGetByteLength(view);

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.