mirror of https://github.com/gorhill/uBlock.git
No need for arrow function for scoping
This commit is contained in:
parent
15450e3957
commit
bedfdff678
|
@ -1152,10 +1152,7 @@ self.addEventListener('hiddenSettingsChanged', ( ) => {
|
|||
// be generated if the user doesn't change his filter lists selection for
|
||||
// some set time.
|
||||
|
||||
µb.selfieManager = (( ) => {
|
||||
let createTimer;
|
||||
let destroyTimer;
|
||||
|
||||
{
|
||||
// As of 2018-05-31:
|
||||
// JSON.stringify-ing ourselves results in a better baseline
|
||||
// memory usage at selfie-load time. For some reasons.
|
||||
|
@ -1206,9 +1203,7 @@ self.addEventListener('hiddenSettingsChanged', ( ) => {
|
|||
};
|
||||
|
||||
const load = async function() {
|
||||
if ( µb.selfieIsInvalid ) {
|
||||
return false;
|
||||
}
|
||||
if ( µb.selfieIsInvalid ) { return false; }
|
||||
try {
|
||||
const results = await Promise.all([
|
||||
loadMain(),
|
||||
|
@ -1231,6 +1226,9 @@ self.addEventListener('hiddenSettingsChanged', ( ) => {
|
|||
return false;
|
||||
};
|
||||
|
||||
let createTimer;
|
||||
let destroyTimer;
|
||||
|
||||
const destroy = function() {
|
||||
io.remove(/^selfie\//);
|
||||
µb.selfieIsInvalid = true;
|
||||
|
@ -1256,8 +1254,8 @@ self.addEventListener('hiddenSettingsChanged', ( ) => {
|
|||
µb.selfieIsInvalid = true;
|
||||
};
|
||||
|
||||
return { load, destroy: destroyAsync };
|
||||
})();
|
||||
µb.selfieManager = { load, destroy: destroyAsync };
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
|
|
Loading…
Reference in New Issue