mirror of https://github.com/gorhill/uBlock.git
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');
|
ubolog('loadFilterLists() Start');
|
||||||
t0 = Date.now();
|
t0 = Date.now();
|
||||||
loadedListKeys.length = 0;
|
loadedListKeys.length = 0;
|
||||||
loadingPromise = Promise.all([
|
loadingPromise = this.loadRedirectResources().then(( ) => {
|
||||||
this.getAvailableLists().then(lists => onFilterListsReady(lists)),
|
ubolog(`loadFilterLists() Redirects/scriptlets ready at ${elapsed()}`);
|
||||||
this.loadRedirectResources().then(( ) => {
|
return this.getAvailableLists();
|
||||||
ubolog(`loadFilterLists() Redirects/scriptlets ready at ${elapsed()}`);
|
}).then(lists => {
|
||||||
}),
|
return onFilterListsReady(lists)
|
||||||
]).then(( ) => {
|
}).then(( ) => {
|
||||||
onDone();
|
onDone();
|
||||||
});
|
});
|
||||||
return loadingPromise;
|
return loadingPromise;
|
||||||
|
|
Loading…
Reference in New Issue