don't be too eager at restoring style elements to prevent deadlocks

This commit is contained in:
tophf 2017-12-07 10:49:47 +03:00
parent 6d4689e559
commit 6e1a6d1ad6

View File

@ -493,9 +493,9 @@
restorationCounter = 0;
}
lastRestorationTime = t;
if (++restorationCounter > 100) {
console.error('Stylus stopped restoring userstyle elements after 100 failed attempts.\n' +
'Please report on https://github.com/openstyles/stylus/issues');
if (++restorationCounter > 10) {
sorting = false;
setTimeout(start, 1000);
return true;
}
}