Open
Description
Based on the bug found in tc39/ecma262#1320 (comment):
- If a non-writable prototype property exists during
o.foo = v
- Define a new property on
o
with{ value: v, enumerable: true, writable: true, configurable: true }
(like it's defining a new property without extending the parent) - Note: It must be configurable to get past the
delete
statement when runninggetRawTag(new Uint8Array(0))
.
- Define a new property on
- Extend
Object.prototype.toString()
special cases with typed arrays,DataView
,ArrayBuffer
,Map
,WeakMap
,Set
,WeakSet
,Promise
, etc.- Note: With the ability to write
value[Symbol.toStringTag] = undefined
, we must fix various builtins to still return the expected[object Foo]
values. - Note: This fixes lodash's
isTypedArray
,isArrayBuffer
, etc, functions directly, and thegetTag
function indirectly by ensuring a few feature checks don't fail and cause a incomplete impl ofgetTag
to be used.
- Note: With the ability to write
Metadata
Metadata
Assignees
Labels
No labels