Fix ReadableStream.prototype.tee

This commit is contained in:
Jarred Sumner
2022-10-23 21:30:50 -07:00
parent 76652ac3ca
commit 360a007f16
3 changed files with 61 additions and 2 deletions

View File

@@ -751,7 +751,7 @@ const char* const s_readableStreamInternalsPipeToFinalizeCode =
const JSC::ConstructAbility s_readableStreamInternalsReadableStreamTeeCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamInternalsReadableStreamTeeCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamTeeCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsReadableStreamTeeCodeLength = 1689;
const int s_readableStreamInternalsReadableStreamTeeCodeLength = 1839;
static const JSC::Intrinsic s_readableStreamInternalsReadableStreamTeeCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamInternalsReadableStreamTeeCode =
"(function (stream, shouldClone) {\n" \
@@ -760,6 +760,12 @@ const char* const s_readableStreamInternalsReadableStreamTeeCode =
" @assert(@isReadableStream(stream));\n" \
" @assert(typeof shouldClone === \"boolean\");\n" \
"\n" \
" var start_ = @getByIdDirectPrivate(stream, \"start\");\n" \
" if (start_) {\n" \
" @putByIdDirectPrivate(stream, \"start\", @undefined);\n" \
" start_();\n" \
" }\n" \
"\n" \
" const reader = new @ReadableStreamDefaultReader(stream);\n" \
"\n" \
" const teeState = {\n" \