mirror of https://github.com/gorhill/uBlock.git
Properly handle potential exception from webext API
Related feedback: - https://github.com/uBlockOrigin/uAssets/discussions/16939#discussioncomment-5356808
This commit is contained in:
parent
6e87026d40
commit
2f42cf61ab
|
@ -1383,10 +1383,13 @@ vAPI.adminStorage = (( ) => {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
const cacheManagedStorage = ( ) => {
|
const cacheManagedStorage = async ( ) => {
|
||||||
webext.storage.managed.get().then(store => {
|
let store;
|
||||||
webext.storage.local.set({ cachedManagedStorage: store || {} });
|
try {
|
||||||
});
|
store = await webext.storage.managed.get();
|
||||||
|
} catch(ex) {
|
||||||
|
}
|
||||||
|
webext.storage.local.set({ cachedManagedStorage: store || {} });
|
||||||
};
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
Loading…
Reference in New Issue