mirror of
https://github.com/denoland/deno.git
synced 2024-11-22 15:06:54 -05:00
fix: stream strategy size should be plain function
This commit is contained in:
parent
14104c4e5b
commit
7ef0f43d87
1 changed files with 4 additions and 6 deletions
|
@ -3018,9 +3018,8 @@
|
||||||
if (byteSizeFunctionWeakMap.has(globalObject)) {
|
if (byteSizeFunctionWeakMap.has(globalObject)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
byteSizeFunctionWeakMap.set(globalObject, function size(chunk) {
|
const size = (chunk) => chunk.byteLength;
|
||||||
return chunk.byteLength;
|
byteSizeFunctionWeakMap.set(globalObject, size);
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class CountQueuingStrategy {
|
class CountQueuingStrategy {
|
||||||
|
@ -3071,9 +3070,8 @@
|
||||||
if (countSizeFunctionWeakMap.has(globalObject)) {
|
if (countSizeFunctionWeakMap.has(globalObject)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
countSizeFunctionWeakMap.set(globalObject, function size() {
|
const size = () => 1;
|
||||||
return 1;
|
countSizeFunctionWeakMap.set(globalObject, size);
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @template R */
|
/** @template R */
|
||||||
|
|
Loading…
Reference in a new issue