mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Fix check in get_array_index_from_id to return early on ASCII char (#36136)
* fix: wrong ascii check in get_array_index_from_id Signed-off-by: Michael Rees <mrees@noeontheend.com> * Update WPT expectations Signed-off-by: Michael Rees <mrees@noeontheend.com> --------- Signed-off-by: Michael Rees <mrees@noeontheend.com>
This commit is contained in:
parent
80fc64d063
commit
09041e77a0
4 changed files with 1 additions and 13 deletions
|
@ -196,7 +196,7 @@ pub(crate) unsafe fn get_array_index_from_id(_cx: *mut JSContext, id: HandleId)
|
||||||
let first_char = char::decode_utf16(chars.iter().cloned())
|
let first_char = char::decode_utf16(chars.iter().cloned())
|
||||||
.next()
|
.next()
|
||||||
.map_or('\0', |r| r.unwrap_or('\0'));
|
.map_or('\0', |r| r.unwrap_or('\0'));
|
||||||
if !first_char.is_ascii_lowercase() {
|
if first_char.is_ascii_lowercase() {
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,4 @@
|
||||||
[HTMLCollection-supported-property-indices.html]
|
[HTMLCollection-supported-property-indices.html]
|
||||||
[Handling of property names that look like integers around 2^31]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Handling of property names that look like integers around 2^32]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Trying to set an expando that would shadow an already-existing indexed property]
|
[Trying to set an expando that would shadow an already-existing indexed property]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,3 @@
|
||||||
[window-indexed-properties-strict.html]
|
[window-indexed-properties-strict.html]
|
||||||
[Indexed properties of the window object (strict mode) 1]
|
[Indexed properties of the window object (strict mode) 1]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[Borderline numeric key: 2 ** 32 - 2 is an index (strict mode)]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -1,6 +1,3 @@
|
||||||
[window-indexed-properties.html]
|
[window-indexed-properties.html]
|
||||||
[Indexed properties of the window object (non-strict mode) 1]
|
[Indexed properties of the window object (non-strict mode) 1]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[Borderline numeric key: 2 ** 32 - 2 is an index]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue