mirror of https://github.com/gorhill/uBlock.git
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:
parent
36fb671460
commit
b79445320d
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -1070,7 +1070,7 @@ return {
|
|||
[ 'blocking', 'requestBody' ]
|
||||
);
|
||||
}
|
||||
vAPI.net.unsuspend();
|
||||
vAPI.net.unsuspend(true);
|
||||
};
|
||||
})(),
|
||||
|
||||
|
|
Loading…
Reference in New Issue