diff options
author | 2022-06-26 06:01:22 -0700 | |
---|---|---|
committer | 2022-06-26 06:01:22 -0700 | |
commit | 77a0f335cb0f18af4e03713583b98e0e1b024b33 (patch) | |
tree | f6ed90a992cb46677ab597bba4f6db2fbfcba3b1 /src/bun.js/builtins/cpp/ReadableStreamBuiltins.cpp | |
parent | 31cfcf2c9f40520dac72530ec62e765d3a0de221 (diff) | |
download | bun-77a0f335cb0f18af4e03713583b98e0e1b024b33.tar.gz bun-77a0f335cb0f18af4e03713583b98e0e1b024b33.tar.zst bun-77a0f335cb0f18af4e03713583b98e0e1b024b33.zip |
wip ReadableStream for HTTP(s) Server
Diffstat (limited to 'src/bun.js/builtins/cpp/ReadableStreamBuiltins.cpp')
-rw-r--r-- | src/bun.js/builtins/cpp/ReadableStreamBuiltins.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/bun.js/builtins/cpp/ReadableStreamBuiltins.cpp b/src/bun.js/builtins/cpp/ReadableStreamBuiltins.cpp index 7ce97e7bb..2af23348e 100644 --- a/src/bun.js/builtins/cpp/ReadableStreamBuiltins.cpp +++ b/src/bun.js/builtins/cpp/ReadableStreamBuiltins.cpp @@ -49,7 +49,7 @@ namespace WebCore { const JSC::ConstructAbility s_readableStreamInitializeReadableStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; const JSC::ConstructorKind s_readableStreamInitializeReadableStreamCodeConstructorKind = JSC::ConstructorKind::None; -const int s_readableStreamInitializeReadableStreamCodeLength = 2501; +const int s_readableStreamInitializeReadableStreamCodeLength = 2783; static const JSC::Intrinsic s_readableStreamInitializeReadableStreamCodeIntrinsic = JSC::NoIntrinsic; const char* const s_readableStreamInitializeReadableStreamCode = "(function (underlyingSource, strategy)\n" \ @@ -90,14 +90,17 @@ const char* const s_readableStreamInitializeReadableStreamCode = " if (@getByIdDirectPrivate(underlyingSource, \"pull\") !== @undefined && !isLazy) {\n" \ " const size = @getByIdDirectPrivate(strategy, \"size\");\n" \ " const highWaterMark = @getByIdDirectPrivate(strategy, \"highWaterMark\");\n" \ + " @putByIdDirectPrivate(this, \"underlyingSource\", @undefined);\n" \ " @setupReadableStreamDefaultController(this, underlyingSource, size, highWaterMark !== @undefined ? highWaterMark : 1, @getByIdDirectPrivate(underlyingSource, \"start\"), @getByIdDirectPrivate(underlyingSource, \"pull\"), @getByIdDirectPrivate(underlyingSource, \"cancel\"));\n" \ " \n" \ " return this;\n" \ " }\n" \ " if (isDirect) {\n" \ + " @putByIdDirectPrivate(this, \"underlyingSource\", underlyingSource);\n" \ " @putByIdDirectPrivate(this, \"start\", () => @createReadableStreamController(this, underlyingSource, strategy));\n" \ " } else if (isLazy) {\n" \ " const autoAllocateChunkSize = underlyingSource.autoAllocateChunkSize;\n" \ + " @putByIdDirectPrivate(this, \"underlyingSource\", @undefined);\n" \ "\n" \ " \n" \ " @putByIdDirectPrivate(this, \"start\", () => {\n" \ @@ -107,6 +110,7 @@ const char* const s_readableStreamInitializeReadableStreamCode = " }\n" \ " });\n" \ " } else {\n" \ + " @putByIdDirectPrivate(this, \"underlyingSource\", @undefined);\n" \ " @putByIdDirectPrivate(this, \"start\", @undefined);\n" \ " @createReadableStreamController(this, underlyingSource, strategy);\n" \ " }\n" \ |