mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-10 01:02:08 +01:00
[mv3] Attempt at mitigation for when "internal error" occurs
Related issue: https://github.com/uBlockOrigin/uBOL-home/issues/199
This commit is contained in:
parent
08e5bffc76
commit
bec5d53ce0
1 changed files with 9 additions and 0 deletions
|
@ -386,8 +386,17 @@ async function start() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// https://github.com/uBlockOrigin/uBOL-home/issues/199
|
||||||
|
// Force a restart of the extension once when an "internal error" occurs
|
||||||
try {
|
try {
|
||||||
start();
|
start();
|
||||||
|
localWrite({ goodStart: true });
|
||||||
} catch(reason) {
|
} catch(reason) {
|
||||||
console.trace(reason);
|
console.trace(reason);
|
||||||
|
localRead.get('goodStart').then((bin = {}) => {
|
||||||
|
if ( bin.goodStart !== true ) { return; }
|
||||||
|
localWrite({ goodStart: false }).then(( ) => {
|
||||||
|
runtime.reload();
|
||||||
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue