From 46245b830a24930ab36f8ce2831325cdd1da17d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E7=91=9E=E4=B8=B0?= Date: Sat, 25 Sep 2021 01:07:22 +0800 Subject: fix(ext/webidl): correctly apply [SymbolToStringTag] to interfaces (#11851) Co-authored-by: Luca Casonato Co-authored-by: Yoshiya Hinosawa --- ext/fetch/20_headers.js | 5 ----- ext/fetch/21_formdata.js | 5 ----- ext/fetch/23_request.js | 5 ----- ext/fetch/23_response.js | 5 ----- 4 files changed, 20 deletions(-) (limited to 'ext/fetch') diff --git a/ext/fetch/20_headers.js b/ext/fetch/20_headers.js index 7503029d8..a99a297b3 100644 --- a/ext/fetch/20_headers.js +++ b/ext/fetch/20_headers.js @@ -36,7 +36,6 @@ Symbol, SymbolFor, SymbolIterator, - SymbolToStringTag, StringPrototypeReplaceAll, StringPrototypeIncludes, TypeError, @@ -411,10 +410,6 @@ } return `Headers ${inspect(headers)}`; } - - get [SymbolToStringTag]() { - return "Headers"; - } } webidl.mixinPairIterable("Headers", Headers, _iterableHeaders, 0, 1); diff --git a/ext/fetch/21_formdata.js b/ext/fetch/21_formdata.js index 25ed32c2d..d8e6d2da2 100644 --- a/ext/fetch/21_formdata.js +++ b/ext/fetch/21_formdata.js @@ -26,7 +26,6 @@ MapPrototypeSet, MathRandom, Symbol, - SymbolToStringTag, StringFromCharCode, StringPrototypeTrim, StringPrototypeSlice, @@ -72,10 +71,6 @@ */ class FormData { - get [SymbolToStringTag]() { - return "FormData"; - } - /** @type {FormDataEntry[]} */ [entryList] = []; diff --git a/ext/fetch/23_request.js b/ext/fetch/23_request.js index 51ea9b3bc..06843d60c 100644 --- a/ext/fetch/23_request.js +++ b/ext/fetch/23_request.js @@ -39,7 +39,6 @@ RegExpPrototypeTest, Symbol, SymbolFor, - SymbolToStringTag, TypeError, } = window.__bootstrap.primordials; @@ -397,10 +396,6 @@ ); } - get [SymbolToStringTag]() { - return "Request"; - } - [SymbolFor("Deno.customInspect")](inspect) { return inspect(consoleInternal.createFilteredInspectProxy({ object: this, diff --git a/ext/fetch/23_response.js b/ext/fetch/23_response.js index 0db20e90e..32ce88d42 100644 --- a/ext/fetch/23_response.js +++ b/ext/fetch/23_response.js @@ -37,7 +37,6 @@ RegExpPrototypeTest, Symbol, SymbolFor, - SymbolToStringTag, TypeError, } = window.__bootstrap.primordials; @@ -373,10 +372,6 @@ return second; } - get [SymbolToStringTag]() { - return "Response"; - } - [SymbolFor("Deno.customInspect")](inspect) { return inspect(consoleInternal.createFilteredInspectProxy({ object: this, -- cgit v1.2.3