Bug 187510
| Summary: | [FileAPI] FileReader.readAsArrayBuffer(null) should throw a Type Error | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | zac spitzer <zac.spitzer> |
| Component: | WebCore JavaScript | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | aestes, cdumez |
| Priority: | P2 | ||
| Version: | Safari 11 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
zac spitzer
Webkit currently just returns, all other major browsers do a type check and throw an error
var reader = new FileReader();
reader.onloadend = function(e) {
console.log(e);
}
reader.readAsArrayBuffer(null);
https://jsbin.com/zonagopuhi/edit?html,js,console,output
https://trac.webkit.org/browser/webkit/trunk/Source/WebCore/fileapi/FileReader.cpp#L79
Here is the Chrome commit which added type checking for FileReader
https://groups.google.com/a/chromium.org/forum/#!topic/blink-reviews/vZxyVFHJ7MU
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |