mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-10 01:02:08 +01:00
Fix race condition when loading redirect/scriptlet resources
Related feedback: https://github.com/uBlockOrigin/uAssets/issues/23806#issuecomment-2190491767
This commit is contained in:
parent
6b349ca0ef
commit
896737d098
1 changed files with 6 additions and 6 deletions
|
@ -1008,12 +1008,12 @@ onBroadcast(msg => {
|
|||
ubolog('loadFilterLists() Start');
|
||||
t0 = Date.now();
|
||||
loadedListKeys.length = 0;
|
||||
loadingPromise = Promise.all([
|
||||
this.getAvailableLists().then(lists => onFilterListsReady(lists)),
|
||||
this.loadRedirectResources().then(( ) => {
|
||||
ubolog(`loadFilterLists() Redirects/scriptlets ready at ${elapsed()}`);
|
||||
}),
|
||||
]).then(( ) => {
|
||||
loadingPromise = this.loadRedirectResources().then(( ) => {
|
||||
ubolog(`loadFilterLists() Redirects/scriptlets ready at ${elapsed()}`);
|
||||
return this.getAvailableLists();
|
||||
}).then(lists => {
|
||||
return onFilterListsReady(lists)
|
||||
}).then(( ) => {
|
||||
onDone();
|
||||
});
|
||||
return loadingPromise;
|
||||
|
|
Loading…
Reference in a new issue