mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 917012 - Too many mainthread stat() calls during downloads. r=enn
This commit is contained in:
parent
d6a0e0f54c
commit
13e81160d0
@ -757,6 +757,7 @@ DownloadsDataCtor.prototype = {
|
||||
*/
|
||||
_updateDataItemState: function (aDataItem)
|
||||
{
|
||||
let oldState = aDataItem.state;
|
||||
let wasInProgress = aDataItem.inProgress;
|
||||
let wasDone = aDataItem.done;
|
||||
|
||||
@ -766,11 +767,13 @@ DownloadsDataCtor.prototype = {
|
||||
aDataItem.endTime = Date.now();
|
||||
}
|
||||
|
||||
for (let view of this._views) {
|
||||
try {
|
||||
view.getViewItem(aDataItem).onStateChange({});
|
||||
} catch (ex) {
|
||||
Cu.reportError(ex);
|
||||
if (oldState != aDataItem.state) {
|
||||
for (let view of this._views) {
|
||||
try {
|
||||
view.getViewItem(aDataItem).onStateChange(oldState);
|
||||
} catch (ex) {
|
||||
Cu.reportError(ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user