Current Behavior: var f = new FileReader(); f.abort(); will throw an exception, owing to bug 657964. Expected Behavior: The File API says: http://dev.w3.org/2006/webapi/FileAPI/#abort which is to do nothing about an abort() call when the status is EMPTY or DONE, NOT to throw an exception. Other Browsers: Chrome and Safari do not throw an exception.
Is this a regression?
Somewhat: we purposefully changed to a behavior that does not match the spec.
bz, I think that this behavior was introduced because the spec. itself was in flux. I don't think it was a willful violation of spec. If you think spec. behavior is wrong, I'd like to know of course :)
I vaguely recall that we intended to align with XHR or something here. Maybe that never ended up happening.
XMLHttpRequest's abort() never throws. I think generally we should throwing unless it catches something that's an actual mistake or cannot be readily handled. I don't think that's the case here.
Created attachment 826457 [details] [diff] [review] FileReaderException.diff
Hey guys, Should I also remove [Throws] just before void abort(); in FileReader.webid? Thanks
Comment on attachment 826457 [details] [diff] [review] FileReaderException.diff Yes, you should remove [Throws] and the ErrorResult param since per spec the method doesn't throw.