chore: Update dlint (#17031)

Introduces `SafeSetIterator` and `SafeMapIterator` to primordials
This commit is contained in:
Kenta Moriuchi 2022-12-20 11:37:50 +09:00 committed by GitHub
parent 2ac575abfb
commit 948f85216a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
31 changed files with 222 additions and 141 deletions

View file

@ -68,7 +68,7 @@
*/
function fillHeaders(headers, object) {
if (ArrayIsArray(object)) {
for (const header of object) {
for (const header of new SafeArrayIterator(object)) {
if (header.length !== 2) {
throw new TypeError(
`Invalid header. Length must be 2, but is ${header.length}`,
@ -205,7 +205,7 @@
// spec but produce the same result.
const headers = {};
const cookies = [];
for (const entry of list) {
for (const entry of new SafeArrayIterator(list)) {
const name = byteLowerCase(entry[0]);
const value = entry[1];
if (value === null) throw new TypeError("Unreachable");
@ -405,6 +405,7 @@
[SymbolFor("Deno.privateCustomInspect")](inspect) {
const headers = {};
// deno-lint-ignore prefer-primordials
for (const header of this) {
headers[header[0]] = header[1];
}