1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-11 08:33:43 -05:00

perf(fetch/Response): avoid class fields (#12237)

This commit is contained in:
Aaron O'Mullan 2021-09-27 10:51:32 +02:00 committed by GitHub
parent 34a15545c9
commit 8aba521e18
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -152,10 +152,6 @@
}
class Response {
/** @type {InnerResponse} */
[_response];
/** @type {Headers} */
[_headers];
get [_mimeType]() {
let charset = null;
let essence = null;
@ -270,7 +266,9 @@
this[webidl.brand] = webidl.brand;
const response = newInnerResponse(init.status, init.statusText);
/** @type {InnerResponse} */
this[_response] = response;
/** @type {Headers} */
this[_headers] = headersFromHeaderList(response.headerList, "response");
if (init.headers !== undefined) {
fillHeaders(this[_headers], init.headers);