summaryrefslogtreecommitdiff
path: root/ext/fetch/20_headers.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/fetch/20_headers.js')
-rw-r--r--ext/fetch/20_headers.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/fetch/20_headers.js b/ext/fetch/20_headers.js
index 3ee9d9184..1690d9f7d 100644
--- a/ext/fetch/20_headers.js
+++ b/ext/fetch/20_headers.js
@@ -100,7 +100,7 @@ function checkForInvalidValueChars(value) {
return true;
}
-let HEADER_NAME_CACHE = {};
+let HEADER_NAME_CACHE = { __proto__: null };
let HEADER_CACHE_SIZE = 0;
const HEADER_NAME_CACHE_SIZE_BOUNDARY = 4096;
function checkHeaderNameForHttpTokenCodePoint(name) {
@@ -112,7 +112,7 @@ function checkHeaderNameForHttpTokenCodePoint(name) {
const valid = RegExpPrototypeTest(HTTP_TOKEN_CODE_POINT_RE, name);
if (HEADER_CACHE_SIZE > HEADER_NAME_CACHE_SIZE_BOUNDARY) {
- HEADER_NAME_CACHE = {};
+ HEADER_NAME_CACHE = { __proto__: null };
HEADER_CACHE_SIZE = 0;
}
HEADER_CACHE_SIZE++;
@@ -241,7 +241,7 @@ class Headers {
// The order of steps are not similar to the ones suggested by the
// spec but produce the same result.
- const seenHeaders = {};
+ const seenHeaders = { __proto__: null };
const entries = [];
for (let i = 0; i < list.length; ++i) {
const entry = list[i];