From 6e1a6d1ad6d4dcb590a354d048efa362961a261c Mon Sep 17 00:00:00 2001 From: tophf Date: Thu, 7 Dec 2017 10:49:47 +0300 Subject: [PATCH] don't be too eager at restoring style elements to prevent deadlocks --- content/apply.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content/apply.js b/content/apply.js index 12bacd53..88ac2d29 100644 --- a/content/apply.js +++ b/content/apply.js @@ -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; } }