diff options
author | Kenta Moriuchi <moriken@kimamass.com> | 2022-12-20 11:37:50 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-20 03:37:50 +0100 |
commit | 948f85216a15e4ef489af21bb532a9b201b0364c (patch) | |
tree | 35c2bbfa021cf9a4190ab803ed091c5547bfe9f4 /ext/web/01_mimesniff.js | |
parent | 2ac575abfb75dc4533306c80240cb1beeb816b9b (diff) |
chore: Update dlint (#17031)
Introduces `SafeSetIterator` and `SafeMapIterator` to primordials
Diffstat (limited to 'ext/web/01_mimesniff.js')
-rw-r--r-- | ext/web/01_mimesniff.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/web/01_mimesniff.js b/ext/web/01_mimesniff.js index d2c784d6e..47453bd99 100644 --- a/ext/web/01_mimesniff.js +++ b/ext/web/01_mimesniff.js @@ -16,6 +16,8 @@ MapPrototypeHas, MapPrototypeSet, RegExpPrototypeTest, + SafeArrayIterator, + SafeMapIterator, StringPrototypeReplaceAll, StringPrototypeToLowerCase, } = window.__bootstrap.primordials; @@ -195,7 +197,7 @@ */ function serializeMimeType(mimeType) { let serialization = essence(mimeType); - for (const param of mimeType.parameters) { + for (const param of new SafeMapIterator(mimeType.parameters)) { serialization += `;${param[0]}=`; let value = param[1]; if (!RegExpPrototypeTest(HTTP_TOKEN_CODE_POINT_RE, value)) { @@ -221,7 +223,7 @@ let charset = null; let essence_ = null; let mimeType = null; - for (const value of headerValues) { + for (const value of new SafeArrayIterator(headerValues)) { const temporaryMimeType = parseMimeType(value); if ( temporaryMimeType === null || |