forked from facebook/hermes
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Array.from using defineOwnProperty instead of defineOwnComputedPr…
…imitive Summary: `Array.from` was using `JSObject::defineOwnProperty` to create properties on the new array. Using that API creates a Symbol and a StringPrimitive for a simple number. It also triggers later slow-paths in the VM, because the "fast index" flags aren't set correctly. Fix this by changing to `JSObject::defineOwnComputedPrimitive`. Reviewed By: tmikov Differential Revision: D23770063 fbshipit-source-id: 1f0412be482793275408eb21ccbcb2f869ca65bb
- Loading branch information
1 parent
b28c502
commit 444fed4
Showing
1 changed file
with
4 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters