Skip to content

Commit c24633e

Browse files
committed
fix streams backpressure condition check
1 parent 8c10cc1 commit c24633e

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1499,7 +1499,7 @@ template <typename Self>
14991499
void WritableImpl<Self>::updateBackpressure(jsg::Lock& js) {
15001500
KJ_ASSERT(isWritable());
15011501
KJ_ASSERT(!isCloseQueuedOrInFlight());
1502-
bool bp = getDesiredSize() < 0;
1502+
bool bp = getDesiredSize() <= 0;
15031503

15041504
if (bp != flags.backpressure) {
15051505
flags.backpressure = bp;

src/wpt/streams-test.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -751,7 +751,6 @@ export default {
751751
expectedFailures: [
752752
'start: errors in start cause WritableStream constructor to throw',
753753
'write: returning a rejected promise (second write) should cause writer write() and ready to reject',
754-
'write: returning a promise that becomes rejected after the writer write() should cause writer write() and ready to reject',
755754
],
756755
},
757756
'writable-streams/byte-length-queuing-strategy.any.js': {
@@ -764,7 +763,6 @@ export default {
764763
'writable-streams/close.any.js': {
765764
comment: 'To be investigated',
766765
expectedFailures: [
767-
'when close is called on a WritableStream in waiting state, ready promise should be fulfilled',
768766
'releaseLock() should not change the result of sync close()',
769767
],
770768
},
@@ -817,10 +815,5 @@ export default {
817815
"underlying sink's write or close should not be called if start throws",
818816
],
819817
},
820-
'writable-streams/write.any.js': {
821-
comment: 'To be investigated',
822-
expectedFailures: [
823-
'WritableStream should transition to waiting until write is acknowledged',
824-
],
825-
},
818+
'writable-streams/write.any.js': {},
826819
} satisfies TestRunnerConfig;

0 commit comments

Comments
 (0)