1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-10-04 08:37:11 +02:00

Force-unsuspend when starting webRequest listener

Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/759

If for some reasons the launch code throws, uBO could
find itself in permanent suspend mode, thus preventing
web pages from loading in Firefox.

Though uBO should not have exceptions thrown during
it's initialization code, this commit will ensure
uBO complete its initialization process should it
ever happen for whatever reason.
This commit is contained in:
Raymond Hill 2019-10-27 11:41:08 -04:00
parent 36fb671460
commit b79445320d
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
2 changed files with 7 additions and 3 deletions

View File

@ -1227,9 +1227,13 @@ vAPI.Net = class {
this.suspendDepth += 1;
}
}
unsuspend() {
unsuspend(all = false) {
if ( this.suspendDepth === 0 ) { return; }
this.suspendDepth -= 1;
if ( all ) {
this.suspendDepth = 0;
} else {
this.suspendDepth -= 1;
}
if ( this.suspendDepth !== 0 ) { return; }
this.unsuspendAllRequests(this.suspendableListener);
}

View File

@ -1070,7 +1070,7 @@ return {
[ 'blocking', 'requestBody' ]
);
}
vAPI.net.unsuspend();
vAPI.net.unsuspend(true);
};
})(),