Auto merge of #20450 - ysimonson:fix-13464, r=jdm

Properly rethrow any exceptions from parsing JSON in Body mixin's `Json()`

This fixes #13464 by rethrowing exceptions from parsing JSON.

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #__ (github issue number if applicable).
- [X] There are tests for these changes

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20450)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2018-03-27 22:44:32 -04:00 committed by GitHub
commit 25dcd0ecfd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 18 deletions

View file

@ -6,9 +6,6 @@
[Consume String request's body as formData]
expected: FAIL
[Trying to consume bad JSON text as JSON: 'undefined']
expected: FAIL
[Consume Int8Array request's body as text]
expected: FAIL
@ -45,15 +42,6 @@
[Consume FormData request's body as FormData]
expected: FAIL
[Trying to consume bad JSON text as JSON: 'undefined']
expected: FAIL
[Trying to consume bad JSON text as JSON: '{']
expected: FAIL
[Trying to consume bad JSON text as JSON: 'a']
expected: FAIL
[Consume ArrayBuffer request's body as blob]
expected: FAIL
@ -81,6 +69,3 @@
[Consume Float32Array request's body as text]
expected: FAIL
[Trying to consume bad JSON text as JSON: '[']
expected: FAIL