aboutsummaryrefslogtreecommitdiffstats
path: root/components/script
diff options
context:
space:
mode:
authorRamana Venkata <idlike2dream@gmail.com>2016-04-26 13:41:36 +0530
committerRamana Venkata <idlike2dream@gmail.com>2016-04-26 17:08:39 +0530
commitf56bd3a6f3216f7556211d3e342e84cac2c15fdb (patch)
treef5a6d61d950da9b680434ccc0eca2076b2b7ddc2 /components/script
parent09b2efc7061337593d948c7fb11b9d80ba42df5a (diff)
downloadservo-f56bd3a6f3216f7556211d3e342e84cac2c15fdb.tar.gz
servo-f56bd3a6f3216f7556211d3e342e84cac2c15fdb.zip
Allow setting withCredentials in synchronous XMLHttpRequest
closes #10839
Diffstat (limited to 'components/script')
-rw-r--r--components/script/dom/xmlhttprequest.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/components/script/dom/xmlhttprequest.rs b/components/script/dom/xmlhttprequest.rs
index 7a538d8ade8..9f74e694ac6 100644
--- a/components/script/dom/xmlhttprequest.rs
+++ b/components/script/dom/xmlhttprequest.rs
@@ -369,8 +369,7 @@ impl XMLHttpRequestMethods for XMLHttpRequest {
// Step 10
if !async {
// FIXME: This should only happen if the global environment is a document environment
- if self.timeout.get() != 0 || self.with_credentials.get() ||
- self.response_type.get() != XMLHttpRequestResponseType::_empty {
+ if self.timeout.get() != 0 || self.response_type.get() != XMLHttpRequestResponseType::_empty {
return Err(Error::InvalidAccess)
}
}
@@ -507,8 +506,6 @@ impl XMLHttpRequestMethods for XMLHttpRequest {
// Step 2
_ if self.send_flag.get() => Err(Error::InvalidState),
// Step 3
- _ if self.sync_in_window() => Err(Error::InvalidAccess),
- // Step 4
_ => {
self.with_credentials.set(with_credentials);
Ok(())