1
0
Fork 0
mirror of https://github.com/gorhill/uMatrix.git synced 2024-06-14 16:25:03 +12:00
This commit is contained in:
gorhill 2015-07-15 09:24:56 -04:00
parent 2b230b85e1
commit e543517500

View file

@ -2181,6 +2181,7 @@ vAPI.cookies.CookieEntry = function(ffCookie) {
vAPI.cookies.start = function() {
Services.obs.addObserver(this, 'cookie-changed', false);
Services.obs.addObserver(this, 'private-cookie-changed', false);
cleanupTasks.push(this.stop.bind(this));
};
@ -2188,14 +2189,15 @@ vAPI.cookies.start = function() {
vAPI.cookies.stop = function() {
Services.obs.removeObserver(this, 'cookie-changed');
Services.obs.removeObserver(this, 'private-cookie-changed');
};
/******************************************************************************/
vAPI.cookies.observe = function(subject, topic, reason) {
if ( topic !== 'cookie-changed' ) {
return;
}
//if ( topic !== 'cookie-changed' && topic !== 'private-cookie-changed' ) {
// return;
//}
if ( reason === 'deleted' || subject instanceof Ci.nsICookie2 === false ) {
return;
}