mirror of https://github.com/gorhill/uBlock.git
[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
|
@ -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 {
|
||||
start();
|
||||
localWrite({ goodStart: true });
|
||||
} catch(reason) {
|
||||
console.trace(reason);
|
||||
localRead.get('goodStart').then((bin = {}) => {
|
||||
if ( bin.goodStart !== true ) { return; }
|
||||
localWrite({ goodStart: false }).then(( ) => {
|
||||
runtime.reload();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue