Backed out changeset 4f7114a9d050 (bug 812119) for test failures.
authorRyan VanderMeulen <ryanvm@gmail.com>
Wed, 28 Nov 2012 22:14:04 -0500
changeset 114436 822a1cfc322d0f9c5e7a9b99e7c0c027a2473e8c
parent 114435 a58070f72659afb0cb26571cf0a1ea8125fb1821
child 114437 a74eab6c64a747433e0da5b3a8571bb3086715e9
push id18772
push userryanvm@gmail.com
push dateThu, 29 Nov 2012 03:14:14 +0000
treeherdermozilla-inbound@822a1cfc322d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs812119
milestone20.0a1
backs out4f7114a9d050df58f478c9711a6c8e0a650c1491
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 4f7114a9d050 (bug 812119) for test failures.
dom/apps/src/Webapps.js
dom/apps/src/Webapps.jsm
--- a/dom/apps/src/Webapps.js
+++ b/dom/apps/src/Webapps.js
@@ -744,17 +744,17 @@ WebappsApplicationMgmt.prototype = {
           let event = new this._window.MozApplicationEvent("applicationinstall",
                            { application : createApplicationObject(this._window, app) });
           this._oninstall.handleEvent(event);
         }
         break;
       case "Webapps:Uninstall:Return:OK":
         if (this._onuninstall) {
           let event = new this._window.MozApplicationEvent("applicationuninstall",
-                           { application : createApplicationObject(this._window, msg) });
+                           { application : createApplicationObject(this._window, { origin: msg.origin }) });
           this._onuninstall.handleEvent(event);
         }
         break;
     }
     this.removeRequest(msg.requestID);
   },
 
   classID: Components.ID("{8c1bca96-266f-493a-8d57-ec7a95098c15}"),
--- a/dom/apps/src/Webapps.jsm
+++ b/dom/apps/src/Webapps.jsm
@@ -1503,17 +1503,17 @@ this.DOMApplicationRegistry = {
 
   uninstall: function(aData, aMm) {
     for (let id in this.webapps) {
       let app = this.webapps[id];
       if (app.origin != aData.origin) {
         continue;
       }
 
-      if (!app.removable)
+      if (!this.webapps[id].removable)
         return;
 
       // Clean up the deprecated manifest cache if needed.
       if (id in this._manifestCache) {
         delete this._manifestCache[id];
       }
 
       // Clear private data first.
@@ -1534,21 +1534,17 @@ this.DOMApplicationRegistry = {
       let dir = this._getAppDir(id);
       try {
         dir.remove(true);
       } catch (e) {}
 
       delete this.webapps[id];
 
       this._saveApps((function() {
-        let detail = {
-          manifestURL: app.manifestURL,
-          origin: aData.origin
-        };
-        this.broadcastMessage("Webapps:Uninstall:Return:OK", detail);
+        this.broadcastMessage("Webapps:Uninstall:Return:OK", aData);
         Services.obs.notifyObservers(this, "webapps-sync-uninstall", appNote);
         this.broadcastMessage("Webapps:RemoveApp", { id: id });
       }).bind(this));
 
       return;
     }
 
     aMm.sendAsyncMessage("Webapps:Uninstall:Return:KO", aData);
@@ -1736,25 +1732,23 @@ this.DOMApplicationRegistry = {
           continue;
 
         // Clean up the deprecated manifest cache if needed.
         if (record.id in this._manifestCache) {
           delete this._manifestCache[record.id];
         }
 
         let origin = this.webapps[record.id].origin;
-        let manifestURL = this.webapps[record.id].manifestURL;
         delete this.webapps[record.id];
         let dir = this._getAppDir(record.id);
         try {
           dir.remove(true);
         } catch (e) {
         }
-        this.broadcastMessage("Webapps:Uninstall:Return:OK", { origin: origin,
-                                                               manifestURL: manifestURL });
+        this.broadcastMessage("Webapps:Uninstall:Return:OK", { origin: origin });
       } else {
         if (this.webapps[record.id]) {
           this.webapps[record.id] = record.value;
           delete this.webapps[record.id].manifest;
         } else {
           let data = { app: record.value };
           this.confirmInstall(data, true);
           this.broadcastMessage("Webapps:Install:Return:OK", data);