1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 15:24:46 -05:00

fix: stream strategy size should be plain function

This commit is contained in:
Luca Casonato 2021-07-03 21:35:59 +02:00 committed by Luca Casonato
parent 14104c4e5b
commit 7ef0f43d87

View file

@ -3018,9 +3018,8 @@
if (byteSizeFunctionWeakMap.has(globalObject)) {
return;
}
byteSizeFunctionWeakMap.set(globalObject, function size(chunk) {
return chunk.byteLength;
});
const size = (chunk) => chunk.byteLength;
byteSizeFunctionWeakMap.set(globalObject, size);
}
class CountQueuingStrategy {
@ -3071,9 +3070,8 @@
if (countSizeFunctionWeakMap.has(globalObject)) {
return;
}
countSizeFunctionWeakMap.set(globalObject, function size() {
return 1;
});
const size = () => 1;
countSizeFunctionWeakMap.set(globalObject, size);
}
/** @template R */