From 8aba521e18e1e11b84171693253ef50ec3fd3c71 Mon Sep 17 00:00:00 2001 From: Aaron O'Mullan Date: Mon, 27 Sep 2021 10:51:32 +0200 Subject: perf(fetch/Response): avoid class fields (#12237) --- ext/fetch/23_response.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'ext/fetch') diff --git a/ext/fetch/23_response.js b/ext/fetch/23_response.js index 13710881f..29a37ceca 100644 --- a/ext/fetch/23_response.js +++ b/ext/fetch/23_response.js @@ -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); -- cgit v1.2.3