From 3aedc370e8da99f559c0555571f4f3eab10f684e Mon Sep 17 00:00:00 2001 From: Ed Morley Date: Wed, 23 Oct 2013 16:14:35 +0100 Subject: [PATCH] Backed out changeset 1864e27d5ee4 (bug 920481) --- .../devtools/app-manager/content/projects.js | 30 +++++++------------ toolkit/devtools/apps/app-actor-front.js | 21 ------------- 2 files changed, 10 insertions(+), 41 deletions(-) diff --git a/browser/devtools/app-manager/content/projects.js b/browser/devtools/app-manager/content/projects.js index d2791e56191..f2f9ad980d3 100644 --- a/browser/devtools/app-manager/content/projects.js +++ b/browser/devtools/app-manager/content/projects.js @@ -14,7 +14,7 @@ const {AppProjects} = require("devtools/app-manager/app-projects"); const {AppValidator} = require("devtools/app-manager/app-validator"); const {Services} = Cu.import("resource://gre/modules/Services.jsm"); const {FileUtils} = Cu.import("resource://gre/modules/FileUtils.jsm"); -const {installHosted, installPackaged, getTargetForApp, reloadApp} = require("devtools/app-actor-front"); +const {installHosted, installPackaged, getTargetForApp} = require("devtools/app-actor-front"); const {EventEmitter} = Cu.import("resource:///modules/devtools/shared/event-emitter.js"); const promise = require("sdk/core/promise"); @@ -174,26 +174,16 @@ let UI = { return this.install(project); } }) - .then(() => { + .then( + () => { button.disabled = false; - // Finally try to reload the app if it is already opened - this.reload(project); - }, - (res) => { - button.disabled = false; - let message = res.error + ": " + res.message; - alert(message); - this.connection.log(message); - }); - }, - - reload: function (project) { - return reloadApp(this.connection.client, - this.listTabsResponse.webappsActor, - this._getProjectManifestURL(project)). - then(() => { - this.connection.log("App reloaded"); - }); + }, + (res) => { + button.disabled = false; + let message = res.error + ": " + res.message; + alert(message); + this.connection.log(message); + }); }, remove: function(location, event) { diff --git a/toolkit/devtools/apps/app-actor-front.js b/toolkit/devtools/apps/app-actor-front.js index aef75a7790c..30bbb08ec86 100644 --- a/toolkit/devtools/apps/app-actor-front.js +++ b/toolkit/devtools/apps/app-actor-front.js @@ -240,24 +240,3 @@ function getTargetForApp(client, webappsActor, manifestURL) { } exports.getTargetForApp = getTargetForApp; -function reloadApp(client, webappsActor, manifestURL) { - let deferred = promise.defer(); - getTargetForApp(client, - webappsActor, - manifestURL). - then((target) => { - // Request the ContentAppActor to reload the app - let request = { - to: target.form.actor, - type: "reload", - manifestURL: manifestURL - }; - client.request(request, (res) => { - deferred.resolve(); - }); - }, () => { - deferred.reject("Not running"); - }); - return deferred.promise; -} -exports.reloadApp = reloadApp;