Chakracore: DataView does not have correct toStringTag

Created on 27 Mar 2016  路  4Comments  路  Source: chakra-core/ChakraCore

In Edge 14.14295 a data view has the incorrect toStringTag.

Object.prototype.toString.call(new DataView(new ArrayBuffer(23)));
// => [object Object] instead of [object DataView]
Bug Fixed

Most helpful comment

@abchatra and I decided this is a low risk bug fix so we'll include it in 1.2.

All 4 comments

The same is for promises:

Object.prototype.toString.call(new Promise(() => {})); // => [object Object]

Note that if you run ch.exe with the -ES6ToStringTag flag both the examples work.

Update: #657 handles the both. (DataView and Promise)

Fyi -ES6ToStringTag turns on the incomplete implementation of the toStringTag feature. So fixing this the way @obastemur has done is a good thing to do before toStringTag is completed.

@abchatra and I decided this is a low risk bug fix so we'll include it in 1.2.

Was this page helpful?
0 / 5 - 0 ratings