Backed out changeset 1864e27d5ee4 (bug 920481)
authorEd Morley <emorley@mozilla.com>
Wed, 23 Oct 2013 16:14:35 +0100
changeset 165622 dad5e53c31a95ac586a67ca04555ff5757c91e54
parent 165621 2c803fb352c95b7343cb869885d75ef975feb1ba
child 165623 987ac1967cbeff0b1cc205287e8175062cc59e7c
push id3066
push userakeybl@mozilla.com
push dateMon, 09 Dec 2013 19:58:46 +0000
treeherdermozilla-beta@a31a0dce83aa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs920481
milestone27.0a1
backs out1864e27d5ee46a4269d376ffee1578f577e21c36
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
Backed out changeset 1864e27d5ee4 (bug 920481)
browser/devtools/app-manager/content/projects.js
toolkit/devtools/apps/app-actor-front.js
--- a/browser/devtools/app-manager/content/projects.js
+++ b/browser/devtools/app-manager/content/projects.js
@@ -9,17 +9,17 @@ const Cr = Components.results;
 Cu.import("resource:///modules/devtools/gDevTools.jsm");
 const {devtools} = Cu.import("resource://gre/modules/devtools/Loader.jsm", {});
 const {require} = devtools;
 const {ConnectionManager, Connection} = require("devtools/client/connection-manager");
 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");
 
 const MANIFEST_EDITOR_ENABLED = "devtools.appmanager.manifestEditor.enabled";
 
 window.addEventListener("message", function(event) {
   try {
@@ -169,36 +169,26 @@ let UI = {
         })
         .then(() => {
            // Install the app to the device if we are connected,
            // and there is no error
            if (project.errorsCount == 0 && this.listTabsResponse) {
              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) {
     if (event) {
       // We don't want the "click" event to be propagated to the project item.
       // That would trigger `selectProject()`.
       event.stopPropagation();
     }
--- a/toolkit/devtools/apps/app-actor-front.js
+++ b/toolkit/devtools/apps/app-actor-front.js
@@ -235,29 +235,8 @@ function getTargetForApp(client, webapps
         deferred.reject(error);
       });
     }
   });
   return deferred.promise;
 }
 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;