Bug 1020972 - validate project if icon & name are unknown. r=dcamp
authorPaul Rouget <paul@mozilla.com>
Fri, 06 Jun 2014 12:01:51 +0800
changeset 206398 07fbb4869b13b469b83c91f3cb32ee8339e256ab
parent 206397 1c4cdf7294f416475421479da42f9add6b0899ac
child 206399 88a641ee5cbe8a92fb784efd66c16af4091f2e63
push id3741
push userasasaki@mozilla.com
push dateMon, 21 Jul 2014 20:25:18 +0000
treeherdermozilla-beta@4d6f46f5af68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdcamp
bugs1020972
milestone32.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 1020972 - validate project if icon & name are unknown. r=dcamp
browser/devtools/webide/content/webide.js
--- a/browser/devtools/webide/content/webide.js
+++ b/browser/devtools/webide/content/webide.js
@@ -611,21 +611,20 @@ let Cmds = {
       let projects = AppProjects.store.object.projects;
       for (let i = 0; i < projects.length; i++) {
         let project = projects[i];
         let panelItemNode = document.createElement("toolbarbutton");
         panelItemNode.className = "panel-item";
         projectsNode.appendChild(panelItemNode);
         panelItemNode.setAttribute("label", project.name || AppManager.DEFAULT_PROJECT_NAME);
         panelItemNode.setAttribute("image", project.icon || AppManager.DEFAULT_PROJECT_ICON);
-        if (!project.validationStatus) {
-          // The result of the validation process (storing names, icons, …) has never been
-          // stored in the IndexedDB database. This happens when the project has been created
-          // from the old app manager. We need to run the validation again and update the name
-          // and icon of the app
+        if (!project.name || !project.icon) {
+          // The result of the validation process (storing names, icons, …) is not stored in
+          // the IndexedDB database when App Manager v1 is used.
+          // We need to run the validation again and update the name and icon of the app.
           AppManager.validateProject(project).then(() => {
             panelItemNode.setAttribute("label", project.name);
             panelItemNode.setAttribute("image", project.icon);
           });
         }
         panelItemNode.addEventListener("click", () => {
           UI.hidePanels();
           AppManager.selectedProject = project;