From 9315b9bda16462116da1451c95f5de517e4da63a Mon Sep 17 00:00:00 2001 From: Marco Bonardo Date: Sat, 6 Dec 2008 12:26:41 +0100 Subject: [PATCH] Bug 468209 - _removeRowsFromHistory is broken, r=gavin --- browser/components/places/content/controller.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/browser/components/places/content/controller.js b/browser/components/places/content/controller.js index 54eccccab167..f8444f7f9af9 100755 --- a/browser/components/places/content/controller.js +++ b/browser/components/places/content/controller.js @@ -990,8 +990,9 @@ PlacesController.prototype = { if (URIs.length > REMOVE_PAGES_MAX_SINGLEREMOVES) { // do removal in chunks to avoid passing a too big array to removePages for (var i = 0; i < URIs.length; i += REMOVE_PAGES_CHUNKLEN) { - var URIslice = URIs.slice(i, Math.max(i + REMOVE_PAGES_CHUNKLEN, URIs.length)); - // set DoBatchNotify only on the last chunk + var URIslice = URIs.slice(i, i + REMOVE_PAGES_CHUNKLEN); + // set DoBatchNotify (third param) only on the last chunk, so we update + // the treeView when we are done. bhist.removePages(URIslice, URIslice.length, (i + REMOVE_PAGES_CHUNKLEN) >= URIs.length); }