Bug 172627
| Summary: | multiple files(5 files) upload with XMLHttpRequest(high cpu usage when listen to onprogress) | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | baobao <acbrr1985> |
| Component: | Accessibility | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Blocker | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Other | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
baobao
Here are the code sample:
var _createXDomainRequest = function(){
var xhr = new XMLHttpRequest();
//xhr.withCredentials = true;
if(isIE9 && XDomainRequest){
xhr = new XDomainRequest();
}
return xhr;
};
var blobSlice = window.File && (File.prototype.slice || File.prototype.mozSlice || File.prototype.webkitSlice) || function(){};
var ajax = _createXDomainRequest();
ajax.onload = function(){};
ajax.onerror = function(){};
if(ajax.upload){
ajax.upload.onprogress = function (event){}
}
ajax.open('put', this.rangeData.upload_url, true);
ajax.setRequestHeader("Etag", md5);
ajax.setRequestHeader("Authorization", self.token);
ajax.send(blobSlice.call(self.blobFile, start, (end + 1)));
if i comment /*
if(ajax.upload){
ajax.upload.onprogress = function (event){}
}
*/
all the file upload are fine.
but I try to listen to onprogress, which cause high CPU usage.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/32418707>