Auto merge of #10573 - jdm:xhrintermittent, r=Manishearth

Do not support XHR.responseXML in worker globals. Fixes #8931.

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10573)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-04-14 02:11:26 +05:30
commit 4f6331953e
3 changed files with 6 additions and 9 deletions

View file

@ -828,6 +828,12 @@ impl XMLHttpRequestMethods for XMLHttpRequest {
// https://xhr.spec.whatwg.org/#the-responsexml-attribute
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() {
XMLHttpRequestResponseType::_empty | XMLHttpRequestResponseType::Document => {
// Step 3

View file

@ -1,3 +0,0 @@
[001.html]
type: testharness
expected: CRASH

View file

@ -1,6 +0,0 @@
[002.html]
type: testharness
expected: TIMEOUT
[sync XMLHttpRequest in dedicated worker]
expected: TIMEOUT