зеркало из https://github.com/mozilla/pjs.git
Bug 226511 Speed up cookie deletions by not reloading the entire tree after every deletion as the rows have already been removed from the tree r=dwitte sr=darin
This commit is contained in:
Родитель
b932e9f94c
Коммит
00ee9604b0
|
@ -54,6 +54,7 @@ else if (window.arguments[0] == "popupManager")
|
|||
dialogType = popupType;
|
||||
|
||||
var cookieBundle;
|
||||
var gUpdatingBatch = false;
|
||||
|
||||
function Startup() {
|
||||
|
||||
|
@ -139,6 +140,8 @@ function Shutdown() {
|
|||
|
||||
var cookieReloadDisplay = {
|
||||
observe: function(subject, topic, state) {
|
||||
if (gUpdatingBatch)
|
||||
return;
|
||||
if (topic == "cookieChanged") {
|
||||
if (state == "cookies") {
|
||||
cookies.length = 0;
|
||||
|
@ -380,6 +383,7 @@ function DeleteAllCookies() {
|
|||
}
|
||||
|
||||
function FinalizeCookieDeletions() {
|
||||
gUpdatingBatch = true;
|
||||
for (var c=0; c<deletedCookies.length; c++) {
|
||||
cookiemanager.remove(deletedCookies[c].host,
|
||||
deletedCookies[c].name,
|
||||
|
@ -387,6 +391,7 @@ function FinalizeCookieDeletions() {
|
|||
document.getElementById("checkbox").checked);
|
||||
}
|
||||
deletedCookies.length = 0;
|
||||
gUpdatingBatch = false;
|
||||
}
|
||||
|
||||
function HandleCookieKeyPress(e) {
|
||||
|
@ -560,6 +565,7 @@ function DeleteAllPermissions() {
|
|||
}
|
||||
|
||||
function FinalizePermissionDeletions() {
|
||||
gUpdatingBatch = true;
|
||||
var ioService = Components.classes["@mozilla.org/network/io-service;1"]
|
||||
.getService(Components.interfaces.nsIIOService);
|
||||
|
||||
|
@ -573,6 +579,7 @@ function FinalizePermissionDeletions() {
|
|||
permissionmanager.remove(deletedPermissions[p].host, deletedPermissions[p].type);
|
||||
}
|
||||
deletedPermissions.length = 0;
|
||||
gUpdatingBatch = false;
|
||||
}
|
||||
|
||||
function HandlePermissionKeyPress(e) {
|
||||
|
|
|
@ -54,6 +54,7 @@ else if (window.arguments[0] == "popupManager")
|
|||
dialogType = popupType;
|
||||
|
||||
var cookieBundle;
|
||||
var gUpdatingBatch = false;
|
||||
|
||||
function Startup() {
|
||||
|
||||
|
@ -139,6 +140,8 @@ function Shutdown() {
|
|||
|
||||
var cookieReloadDisplay = {
|
||||
observe: function(subject, topic, state) {
|
||||
if (gUpdatingBatch)
|
||||
return;
|
||||
if (topic == "cookieChanged") {
|
||||
if (state == "cookies") {
|
||||
cookies.length = 0;
|
||||
|
@ -380,6 +383,7 @@ function DeleteAllCookies() {
|
|||
}
|
||||
|
||||
function FinalizeCookieDeletions() {
|
||||
gUpdatingBatch = true;
|
||||
for (var c=0; c<deletedCookies.length; c++) {
|
||||
cookiemanager.remove(deletedCookies[c].host,
|
||||
deletedCookies[c].name,
|
||||
|
@ -387,6 +391,7 @@ function FinalizeCookieDeletions() {
|
|||
document.getElementById("checkbox").checked);
|
||||
}
|
||||
deletedCookies.length = 0;
|
||||
gUpdatingBatch = false;
|
||||
}
|
||||
|
||||
function HandleCookieKeyPress(e) {
|
||||
|
@ -560,6 +565,7 @@ function DeleteAllPermissions() {
|
|||
}
|
||||
|
||||
function FinalizePermissionDeletions() {
|
||||
gUpdatingBatch = true;
|
||||
var ioService = Components.classes["@mozilla.org/network/io-service;1"]
|
||||
.getService(Components.interfaces.nsIIOService);
|
||||
|
||||
|
@ -573,6 +579,7 @@ function FinalizePermissionDeletions() {
|
|||
permissionmanager.remove(deletedPermissions[p].host, deletedPermissions[p].type);
|
||||
}
|
||||
deletedPermissions.length = 0;
|
||||
gUpdatingBatch = false;
|
||||
}
|
||||
|
||||
function HandlePermissionKeyPress(e) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче