Bug 621802 - Make the bookmark star async (don't block UI during page load) [r=mfinkle]

This commit is contained in:
Matt Brubeck 2010-12-29 13:35:06 -08:00
Родитель cc6b3aa691
Коммит 00d1e28ecb
1 изменённых файлов: 6 добавлений и 4 удалений

Просмотреть файл

@ -654,10 +654,12 @@ var BrowserUI = {
},
updateStar: function() {
if (PlacesUtils.getMostRecentBookmarkForURI(Browser.selectedBrowser.currentURI) != -1)
this.starButton.setAttribute("starred", "true");
else
this.starButton.removeAttribute("starred");
PlacesUtils.asyncGetBookmarkIds(getBrowser().currentURI, function (aItemIds) {
if (aItemIds.length)
this.starButton.setAttribute("starred", "true");
else
this.starButton.removeAttribute("starred");
}, this);
},
newTab: function newTab(aURI, aOwner) {