Issue 4253 - Setting timeout on a sync XHR should throw InvalidAccessErr

This commit is contained in:
Med0paW 2014-12-05 10:34:25 -08:00
parent c6aadc5bcc
commit dacd21ac52
2 changed files with 1 additions and 6 deletions

View file

@ -460,7 +460,7 @@ impl<'a> XMLHttpRequestMethods for JSRef<'a, XMLHttpRequest> {
fn SetTimeout(self, timeout: u32) -> ErrorResult {
if self.sync.get() {
// FIXME: Not valid for a worker environment
Err(InvalidState)
Err(InvalidAccess)
} else {
self.timeout.set(timeout);
if self.send_flag.get() {