mirror of
https://github.com/gorhill/uBlock.git
synced 2026-03-11 09:04:36 +00:00
[mv3] Remove pointless promise
This commit is contained in:
parent
0e303060dd
commit
0a13683167
1 changed files with 18 additions and 21 deletions
|
|
@ -526,28 +526,25 @@ async function start() {
|
|||
|
||||
/******************************************************************************/
|
||||
|
||||
const isFullyInitialized = new Promise(resolve => {
|
||||
// https://github.com/uBlockOrigin/uBOL-home/issues/199
|
||||
// Force a restart of the extension once when an "internal error" occurs
|
||||
start().then(( ) => {
|
||||
localRemove('goodStart');
|
||||
return false;
|
||||
}).catch(reason => {
|
||||
console.trace(reason);
|
||||
if ( process.wakeupRun ) { return; }
|
||||
return localRead('goodStart').then(goodStart => {
|
||||
if ( goodStart === false ) {
|
||||
localRemove('goodStart');
|
||||
return false;
|
||||
}
|
||||
return localWrite('goodStart', false).then(( ) => true);
|
||||
});
|
||||
}).then(restart => {
|
||||
if ( restart !== true ) { return; }
|
||||
runtime.reload();
|
||||
}).finally(( ) => {
|
||||
resolve(true);
|
||||
// https://github.com/uBlockOrigin/uBOL-home/issues/199
|
||||
// Force a restart of the extension once when an "internal error" occurs
|
||||
|
||||
const isFullyInitialized = start().then(( ) => {
|
||||
localRemove('goodStart');
|
||||
return false;
|
||||
}).catch(reason => {
|
||||
console.trace(reason);
|
||||
if ( process.wakeupRun ) { return; }
|
||||
return localRead('goodStart').then(goodStart => {
|
||||
if ( goodStart === false ) {
|
||||
localRemove('goodStart');
|
||||
return false;
|
||||
}
|
||||
return localWrite('goodStart', false).then(( ) => true);
|
||||
});
|
||||
}).then(restart => {
|
||||
if ( restart !== true ) { return; }
|
||||
runtime.reload();
|
||||
});
|
||||
|
||||
runtime.onMessage.addListener((request, sender, callback) => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue