Bug 779497 - Clear addons list inside of async callback. r=wesj
authorBrian Nicholson <bnicholson@mozilla.com>
Mon, 03 Jun 2013 12:55:46 -0700
changeset 145344 3c5ff4fdd7d89605feda40e9ab4b7481ad074bdc
parent 145343 0a6f4bdb34bfb5c191d4488dca725b0792b7f67d
child 145345 1bf281b93dc55721523e38a8fefd0f15d675a8de
push id2697
push userbbajaj@mozilla.com
push dateMon, 05 Aug 2013 18:49:53 +0000
treeherdermozilla-beta@dfec938c7b63 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswesj
bugs779497
milestone24.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 779497 - Clear addons list inside of async callback. r=wesj
mobile/android/chrome/content/aboutAddons.js
--- a/mobile/android/chrome/content/aboutAddons.js
+++ b/mobile/android/chrome/content/aboutAddons.js
@@ -223,22 +223,22 @@ var Addons = {
 
   _getElementForAddon: function(aKey) {
     let list = document.getElementById("addons-list");
     let element = list.querySelector("div[addonID=" + aKey.quote() + "]");
     return element;
   },
 
   getAddons: function getAddons() {
-    // Clear all content before filling the addons
-    let list = document.getElementById("addons-list");
-    list.innerHTML = "";
-
     let self = this;
     AddonManager.getAddonsByTypes(["extension", "theme", "locale"], function(aAddons) {
+      // Clear all content before filling the addons
+      let list = document.getElementById("addons-list");
+      list.innerHTML = "";
+
       for (let i=0; i<aAddons.length; i++) {
         let item = self._createItemForAddon(aAddons[i]);
         list.appendChild(item);
       }
 
       // Load the search engines
       let defaults = Services.search.getDefaultEngines({ }).map(function (e) e.name);
       function isDefault(aEngine)