diff options
Diffstat (limited to 'ext')
-rw-r--r-- | ext/webidl/00_webidl.js | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/ext/webidl/00_webidl.js b/ext/webidl/00_webidl.js index 1357d308e..46d0a2c1d 100644 --- a/ext/webidl/00_webidl.js +++ b/ext/webidl/00_webidl.js @@ -486,14 +486,6 @@ converters.DataView = (V, opts = {}) => { return V; }; -// Returns the unforgeable `TypedArray` constructor name or `undefined`, -// if the `this` value isn't a valid `TypedArray` object. -// -// https://tc39.es/ecma262/#sec-get-%typedarray%.prototype-@@tostringtag -const typedArrayNameGetter = ObjectGetOwnPropertyDescriptor( - ObjectGetPrototypeOf(Uint8Array).prototype, - SymbolToStringTag, -).get; ArrayPrototypeForEach( [ Int8Array, @@ -510,7 +502,7 @@ ArrayPrototypeForEach( const name = func.name; const article = RegExpPrototypeTest(/^[AEIOU]/, name) ? "an" : "a"; converters[name] = (V, opts = {}) => { - if (!ArrayBufferIsView(V) || typedArrayNameGetter.call(V) !== name) { + if (TypedArrayPrototypeGetSymbolToStringTag(V) !== name) { throw makeException( TypeError, `is not ${article} ${name} object`, |