mirror of
https://github.com/gorhill/uMatrix.git
synced 2024-10-01 17:46:23 +13:00
Firefox: this fixes ocasional bad cookie handling
This commit is contained in:
parent
05089dc370
commit
1e1ec2e92c
1 changed files with 6 additions and 3 deletions
|
@ -1930,11 +1930,14 @@ vAPI.cookies.observe = function(subject, topic, reason) {
|
||||||
if ( topic !== 'cookie-changed' ) {
|
if ( topic !== 'cookie-changed' ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var handler = reason === 'deleted' ? this.onRemoved : this.onChanged;
|
// https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XPCOM/Reference/Interface/nsICookieService
|
||||||
if ( typeof handler !== 'function' ) {
|
if ( reason === 'deleted' || subject instanceof Ci.nsICookie2 === false ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
handler(new this.CookieEntry(subject.QueryInterface(Ci.nsICookie)));
|
if ( typeof this.onChanged !== 'function' ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.onChanged(new this.CookieEntry(subject));
|
||||||
};
|
};
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
Loading…
Reference in a new issue