mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-05 18:32:30 +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
@ -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 New Issue
Block a user