Skip to content

Commit e7e6644

Browse files
committed
remove readLoop
1 parent d65e56e commit e7e6644

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

lib/web/fetch/util.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1265,14 +1265,10 @@ function readAllBytes (reader, successSteps, failureSteps) {
12651265
byteLength += chunk.length
12661266

12671267
// 3. Read-loop given reader, bytes, successSteps, and failureSteps.
1268-
readLoop()
1269-
}
1270-
1271-
function readLoop () {
12721268
reader.read().then(readResultHandler, failureSteps)
12731269
}
12741270

1275-
readLoop()
1271+
reader.read().then(readResultHandler, failureSteps)
12761272
}
12771273

12781274
/**

test/fetch/util.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ describe('isOriginIPPotentiallyTrustworthy()', () => {
378378
})
379379

380380
describe('readAllBytes', () => {
381-
const iterations = 100000
381+
const iterations = 1000000
382382

383383
test(`should not break on potential stack overflow, when simulating ${iterations} enqueued chunks`, async (t) => {
384384
const { strictEqual, fail } = tspl(t, { plan: 1 })

0 commit comments

Comments
 (0)