mirror of
https://github.com/servo/servo.git
synced 2025-08-04 05:00:08 +01:00
Do not support XHR.responseXML in worker globals. Fixes #8931.
This commit is contained in:
parent
dfb482a2b7
commit
dd5e28e0e6
3 changed files with 6 additions and 9 deletions
|
@ -828,6 +828,12 @@ impl XMLHttpRequestMethods for XMLHttpRequest {
|
||||||
|
|
||||||
// https://xhr.spec.whatwg.org/#the-responsexml-attribute
|
// https://xhr.spec.whatwg.org/#the-responsexml-attribute
|
||||||
fn GetResponseXML(&self) -> Fallible<Option<Root<Document>>> {
|
fn GetResponseXML(&self) -> Fallible<Option<Root<Document>>> {
|
||||||
|
// TODO(#2823): Until [Exposed] is implemented, this attribute needs to return null
|
||||||
|
// explicitly in the worker scope.
|
||||||
|
if let GlobalRoot::Worker(_) = self.global() {
|
||||||
|
return Ok(None);
|
||||||
|
}
|
||||||
|
|
||||||
match self.response_type.get() {
|
match self.response_type.get() {
|
||||||
XMLHttpRequestResponseType::_empty | XMLHttpRequestResponseType::Document => {
|
XMLHttpRequestResponseType::_empty | XMLHttpRequestResponseType::Document => {
|
||||||
// Step 3
|
// Step 3
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
[001.html]
|
|
||||||
type: testharness
|
|
||||||
expected: CRASH
|
|
|
@ -1,6 +0,0 @@
|
||||||
[002.html]
|
|
||||||
type: testharness
|
|
||||||
expected: TIMEOUT
|
|
||||||
[sync XMLHttpRequest in dedicated worker]
|
|
||||||
expected: TIMEOUT
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue