mirror of
https://github.com/gorhill/uBlock.git
synced 2025-04-07 00:41:19 +08:00
[mv3] Avoid re-entrance when registering content scripts
This commit is contained in:
parent
4d12ac788c
commit
c3187d85e8
@ -495,11 +495,12 @@ function registerScriptlet(context, scriptletDetails) {
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
async function registerInjectables(origins) {
|
||||
void origins;
|
||||
|
||||
async function registerInjectables() {
|
||||
if ( browser.scripting === undefined ) { return false; }
|
||||
|
||||
if ( registerInjectables.barrier ) { return true; }
|
||||
registerInjectables.barrier = true;
|
||||
|
||||
const [
|
||||
filteringModeDetails,
|
||||
rulesetsDetails,
|
||||
@ -548,6 +549,8 @@ async function registerInjectables(origins) {
|
||||
.catch(reason => { console.info(reason); });
|
||||
}
|
||||
|
||||
registerInjectables.barrier = false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user