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 structuredClone instead of v8 · nodejs/node@122c51b

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
+5-7Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,6 @@ const {
5555
kEnumerableProperty,
5656
} = require('internal/util');
5757

58-
const {
59-
serialize,
60-
deserialize,
61-
} = require('v8');
62-
6358
const {
6459
validateBuffer,
6560
validateObject,
@@ -90,6 +85,10 @@ const {
9085
kIsReadable,
9186
} = require('internal/streams/utils');
9287

88+
const {
89+
structuredClone,
90+
} = require('internal/structured_clone');
91+
9392
const {
9493
ArrayBufferViewGetBuffer,
9594
ArrayBufferViewGetByteLength,
@@ -1470,8 +1469,7 @@ function readableStreamDefaultTee(stream, cloneForBranch2) {
14701469
const value1 = value;
14711470
let value2 = value;
14721471
if (!canceled2 && cloneForBranch2) {
1473-
// Structured Clone
1474-
value2 = deserialize(serialize(value2));
1472+
value2 = structuredClone(value2);
14751473
}
14761474
if (!canceled1) {
14771475
readableStreamDefaultControllerEnqueue(

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.