Bug 229575

Summary: Float32Arrays.sort() return undefined when length < 2
Product: WebKit Reporter: carol.sun
Component: JavaScriptCoreAssignee: Yusuke Suzuki <ysuzuki>
Status: RESOLVED FIXED    
Severity: Normal CC: ews-watchlist, fpizlo, joepeck, keith_miller, mark.lam, msaboff, saam, tzagallo, webkit-bug-importer, ysuzuki
Priority: P2 Keywords: InRadar
Version: Safari 13   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description carol.sun 2021-08-26 10:49:01 PDT
Safari has a javascript bug where Float32Arrays and Float64Arrays return undefined if it is sorted and has less than 2 elements. 

For example,
`new Float32Array([1]).slice().sort()`
returns undefined, when it should return Float32Array [4]
Comment 1 Yusuke Suzuki 2021-08-26 19:07:48 PDT
Created attachment 436602 [details]
Patch
Comment 2 EWS 2021-08-26 22:42:49 PDT
Committed r281686 (241036@main): <https://commits.webkit.org/241036@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 436602 [details].
Comment 3 Radar WebKit Bug Importer 2021-08-26 22:43:20 PDT
<rdar://problem/82423241>