Skip to content

Commit

Permalink
Using unstable sort for sorting keys on to_json() for GC objects (#833
Browse files Browse the repository at this point in the history
)
  • Loading branch information
Razican authored Oct 9, 2020
1 parent b26f8bc commit e82dee1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion boa/src/object/gcobject.rs
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ impl GcObject {
Err(interpreter.construct_type_error("cyclic object value"))
} else if self.borrow().is_array() {
let mut keys: Vec<u32> = self.borrow().index_property_keys().cloned().collect();
keys.sort();
keys.sort_unstable();
let mut arr: Vec<JSONValue> = Vec::with_capacity(keys.len());
let this = Value::from(self.clone());
for key in keys {
Expand Down

0 comments on commit e82dee1

Please sign in to comment.