Make readystatechange fire more often (fixes#13481)
<!-- 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#13481 (github issue number if applicable).
<!-- Either: -->
- [x] There are tests for these changes OR
- [ ] These changes do not require tests because _____
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
<!-- 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/13485)
<!-- Reviewable:end -->
Remove ignore-heap-size comment to enable memory measurement on HashSet
Remove the ignore-heap-size comment to enable the memory measurement.
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix#6909
- [x] These changes do not require tests because they just enabled memory measurement
@jdm the build fails, and I'm not so sure why. Assistance please? 😄
<!-- 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/13531)
<!-- Reviewable:end -->
Update WebBluetooth to use Promises
<!-- Please describe your changes on the following line: -->
Initial patch to support promises in WebBluetooth.
This will allow us to use the expected syntax in webpages.
---
<!-- 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
- [ ] These changes fix #__ (github issue number if applicable).
<!-- Either: -->
- [X] There are tests for these changes OR
- [ ] These changes do not require tests because _____
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
<!-- 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/13428)
<!-- Reviewable:end -->
The spec removed it. Check the scheme instead, data is always same origin now,
except for workers.
This also updates the comments to make step numbers match the spec.
Closes#13362
Fix codegen for iterable's forEach method
<!-- 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#13451 (github issue number if applicable).
<!-- Either: -->
- [x] There are tests for these changes OR
- [ ] These changes do not require tests because _____
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
The `forEach` method installed on iterable DOM interfaces uses SpiderMonkey's self-hosted implementation of `Array.prototype.forEach`, but it has the wrong value for `nargs`, causing failing asserts in debug and wrong behavior in release builds.
Fixes#13451
<!-- 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/13508)
<!-- Reviewable:end -->
implement Body for dom::Response and dom::Request
<!-- Please describe your changes on the following line: -->
This PR adds dom::Response and dom::Request's `Text()`, `Blob()`, `Json()`, and (part of the) `FormData()` functions, part of the [Body mixin](https://fetch.spec.whatwg.org/#body). The corresponding tests have also been updated as passing.
@jeenalee also contributed to this PR, primarily the `Blob()`, `Json()`, and `FormData()` implementations.
---
<!-- 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
- [ ] These changes fix #__ (github issue number if applicable).
<!-- Either: -->
- [X] There are tests for these changes OR
- [ ] These changes do not require tests because _____
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
<!-- 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/13345)
<!-- Reviewable:end -->
The `forEach` method installed on iterable DOM interfaces uses SpiderMonkey's self-hosted implementation of `Array.prototype.forEach`, but it has the wrong value for `nargs`, causing failing asserts in debug and wrong behavior in release builds.
Fixes#13451
Disable EventSource until it is fully implemented.
This also causes a number of tests that currently time out to fail quickly.
<!-- 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/13475)
<!-- Reviewable:end -->
Form action url 11219
First pass at fixing #10580.
I've added a new macro that returns a DomString with either the attr val or the doc url.
I then made the form element use that macro on the action attribute.
I also added a test that contains an iframe with a form and base url that submits to a page in
a resources directory.
I made all these changes based on https://github.com/servo/servo/pull/11219#issuecomment-223318881.
The only thing I'm confused on is how to change step 8. It looks to just be getting the action so I'm wondering if I need to change either step 9 or 10 instead?
---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix#10580 (github issue number if applicable).
- [X] There are tests for these changes OR
using that macro with the form action,
making the form submit process use base url,
adding tests.
<!-- 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/13358)
<!-- Reviewable:end -->
Invoke failure steps if there's no metadata
Media element network response processing code should invoke failure steps if there's no metadata.
Fixes#13375.
<!-- 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/13412)
<!-- Reviewable:end -->
Extract panic-catching for JS engine callbacks into a separate function
All of our generated code for script contains inline code like this:
```
let result = panic::catch_unwind(AssertUnwindSafe(|| {
...
};
match result {
Ok(result) => result,
Err(error) => {
store_panic_result(error);
return false;
}
}
```
This PR change it to something like this:
```
wrap_panic(|| { ... }, false)
```
---
- [X] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [X] These changes fix#13377
- [ ] 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/13406)
<!-- Reviewable:end -->
Removed support for UTF-16 in TextEncoder
<!-- 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#13231 (github issue number if applicable).
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
<!-- 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/13405)
<!-- Reviewable:end -->