Auto merge of #24455 - saschanaz:sequence-strict, r=jdm

Throw when failing to convert sequence inner values

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #24406

<!-- Either: -->
- [x] There are tests for these changes

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
This commit is contained in:
bors-servo 2019-10-17 14:21:04 -04:00 committed by GitHub
commit 5b696bbbd0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 2 deletions

2
Cargo.lock generated
View file

@ -3112,7 +3112,7 @@ dependencies = [
[[package]]
name = "mozjs"
version = "0.12.1"
source = "git+https://github.com/servo/rust-mozjs#0832eb778689143cd9f2f3967fac912f7096a466"
source = "git+https://github.com/servo/rust-mozjs#c2896b9c9f8681070890bc9582378472d0139b13"
dependencies = [
"cc",
"lazy_static",

View file

@ -461575,7 +461575,7 @@
"testharness"
],
"WebIDL/ecmascript-binding/sequence-conversion.html": [
"4caa5563b56b55ffb01a81e63c69ac0f009bda77",
"f878a2672e3082c4f617bbb314cf2de84266f729",
"testharness"
],
"WebIDL/ecmascript-binding/support/constructors-support.html": [

View file

@ -128,4 +128,9 @@ test(t => {
assert_array_equals(ctx.getLineDash(), [13, 14, 15, 16]);
}, "A holey array with fallback to an accessor on the prototype");
test(t => {
// Should fail rather than falling back to record
assert_throws(new TypeError(), function() { new URLSearchParams(["key", "value"]); });
}, "A string array in sequence<sequence> or record");
</script>