mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-10 09:07:54 +01:00
Fix regression in selfie destruction code
Related commit: -915687fddb (diff-73ef8c4664f2ec8c02320d50b2908efdR1100-R1113)
Since selfie destruction is now deferred so as to coallesce burst of call to destroy(), the selfie load code must mind whether there is a pending destruction in order to decide whether the selfie can be safely loaded. Related feedback: -23c4c80136 (commitcomment-35179834)
This commit is contained in:
parent
3bdad19d6e
commit
eb871ae558
2 changed files with 6 additions and 2 deletions
|
@ -140,8 +140,8 @@ const µBlock = (( ) => { // jshint ignore:line
|
|||
|
||||
// Read-only
|
||||
systemSettings: {
|
||||
compiledMagic: 19, // Increase when compiled format changes
|
||||
selfieMagic: 19, // Increase when selfie format changes
|
||||
compiledMagic: 20, // Increase when compiled format changes
|
||||
selfieMagic: 20, // Increase when selfie format changes
|
||||
},
|
||||
|
||||
restoreBackupSettings: {
|
||||
|
|
|
@ -1052,6 +1052,10 @@
|
|||
};
|
||||
|
||||
const load = async function() {
|
||||
if ( destroyTimer !== undefined ) {
|
||||
return Promise.resolve(false);
|
||||
}
|
||||
|
||||
return Promise.all([
|
||||
µb.assets.get('selfie/main').then(details => {
|
||||
if (
|
||||
|
|
Loading…
Reference in a new issue