Skip to content

Commit e1fa4a5

Browse files
committed
Additional cleanups and fixups
1 parent 8d1a7ac commit e1fa4a5

File tree

10 files changed

+207
-278
lines changed

10 files changed

+207
-278
lines changed

src/workerd/api/streams/compression.c++

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,7 @@ class CompressionStreamBase: public kj::Refcounted,
249249
explicit CompressionStreamBase(kj::String format,
250250
Context::ContextFlags flags,
251251
kj::Arc<const jsg::ExternalMemoryTarget>&& externalMemoryTarget)
252-
: state(decltype(state)::template create<Open>()),
253-
context(mode, format, flags, kj::mv(externalMemoryTarget)) {}
252+
: context(mode, format, flags, kj::mv(externalMemoryTarget)) {}
254253

255254
// WritableStreamSink implementation ---------------------------------------------------
256255

@@ -307,16 +306,6 @@ class CompressionStreamBase: public kj::Refcounted,
307306
virtual bool isInTerminalState() = 0;
308307

309308
private:
310-
// Helper to check that the stream is still active (Open state).
311-
// Throws an appropriate error if the stream has ended or errored.
312-
void requireActive(kj::StringPtr errorMessage) {
313-
KJ_IF_SOME(exception, state.tryGetErrorUnsafe()) {
314-
kj::throwFatalException(kj::cp(exception));
315-
}
316-
// isActive() returns true only if in Open state (the ActiveState)
317-
JSG_REQUIRE(state.isActive(), Error, errorMessage);
318-
}
319-
320309
struct PendingRead {
321310
kj::ArrayPtr<kj::byte> buffer;
322311
size_t minBytes = 1;

0 commit comments

Comments
 (0)