Closed Bug 1486265 Opened 7 years ago Closed 7 years ago

Inconsistent result when using negative/float index to assign a TypedArray object

Categories

(Core :: JavaScript Engine, defect)

63 Branch
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1129202

People

(Reporter: sunlili, Unassigned)

References

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36 Steps to reproduce: Executing following code : var a = new Int32Array(5) a[1] = 1; a[2.5] = 2; a[-3] = 3; a[NaN] = 4; a[10] = 5; print(JSON.stringify(a)); print("BT_FLAG") Actual results: Output of ChakraCore and V8: {"0":0,"1":1,"2":0,"3":0,"4":0} BT_FLAG Output of SpiderMonkey: {"0":0,"1":1,"2":0,"3":0,"4":0,"2.5":2,"NaN":4} BT_FLAG Output of JavaScriptCore: {"0":0,"1":1,"2":0,"3":0,"4":0,"2.5":2,"-3":3,"NaN":4} BT_FLAG Expected results: I don't know which one is correct.
Component: Untriaged → JavaScript Engine
Product: Firefox → Core
(In reply to sunlili from comment #0) > Expected results: > > I don't know which one is correct. ChakraCore and V8 are correct. This issue will be fixed by bug 1129202.
Depends on: 1129202
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.