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:
parent
34a15545c9
commit
8aba521e18
1 changed files with 2 additions and 4 deletions
|
@ -152,10 +152,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
class Response {
|
class Response {
|
||||||
/** @type {InnerResponse} */
|
|
||||||
[_response];
|
|
||||||
/** @type {Headers} */
|
|
||||||
[_headers];
|
|
||||||
get [_mimeType]() {
|
get [_mimeType]() {
|
||||||
let charset = null;
|
let charset = null;
|
||||||
let essence = null;
|
let essence = null;
|
||||||
|
@ -270,7 +266,9 @@
|
||||||
|
|
||||||
this[webidl.brand] = webidl.brand;
|
this[webidl.brand] = webidl.brand;
|
||||||
const response = newInnerResponse(init.status, init.statusText);
|
const response = newInnerResponse(init.status, init.statusText);
|
||||||
|
/** @type {InnerResponse} */
|
||||||
this[_response] = response;
|
this[_response] = response;
|
||||||
|
/** @type {Headers} */
|
||||||
this[_headers] = headersFromHeaderList(response.headerList, "response");
|
this[_headers] = headersFromHeaderList(response.headerList, "response");
|
||||||
if (init.headers !== undefined) {
|
if (init.headers !== undefined) {
|
||||||
fillHeaders(this[_headers], init.headers);
|
fillHeaders(this[_headers], init.headers);
|
||||||
|
|
Loading…
Reference in a new issue