Last Comment Bug 739330 - navigator.mozApps - app uninstall
: navigator.mozApps - app uninstall
Product: Core
Classification: Components
Component: DOM: Apps (show other bugs)
: unspecified
: All All
-- normal (vote)
: mozilla16
Assigned To: Ian Bicking (:ianb)
: [:fabrice] Fabrice Desré
Depends on:
Blocks: 746465
  Show dependency treegraph
Reported: 2012-03-26 12:03 PDT by [:onecyrenus]
Modified: 2012-07-28 09:24 PDT (History)
5 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

patch for webapps.js (767 bytes, text/plain)
2012-03-26 12:03 PDT, [:onecyrenus]
no flags Details
Fix for bug, test, and fix for test (3.43 KB, patch)
2012-06-11 19:30 PDT, Ian Bicking (:ianb)
fabrice: review+
myk: checkin+
Details | Diff | Splinter Review

Description User image [:onecyrenus] 2012-03-26 12:03:46 PDT
Created attachment 609405 [details]
patch for webapps.js

Currently if you call uninstall on an app that is no longer installed, the onerror handler is invoked as expected but the error message is the origin ? 

this is something that would be hard to script around, my recommendation would be to return a string indicating that the app was not able to be uninstalled.
Comment 1 User image [:onecyrenus] 2012-03-26 12:07:45 PDT
Currently the HTML / JS implementation returns NOT_INSTALLED... which is interesting because that was the reason we were calling uninstall.. 

maybe something like UNABLE_TO_FIND_APP would be more useful
Comment 2 User image Ian Bicking (:ianb) 2012-03-26 12:11:58 PDT
NOT_INSTALLED is the error message Fabrice and I discussed on IRC.
Comment 3 User image [:fabrice] Fabrice Desré 2012-03-26 12:20:51 PDT
Yes, NOT_INSTALLED makes more sense. You just can't uninstall something that's not installed ;)
Comment 4 User image Ian Bicking (:ianb) 2012-06-11 19:30:34 PDT
Created attachment 632109 [details] [diff] [review]
Fix for bug, test, and fix for test

This just ignores the message data sent from Webapps.jsm to Webapps.js (and turns all uninstall errors to NOT_INSTALLED), which seems to happen elsewhere in the codebase, but seems a little fishy.  Maybe it should send the error name as the data.
Comment 5 User image Myk Melez [:myk] [@mykmelez] 2012-06-18 14:42:08 PDT
Comment on attachment 632109 [details] [diff] [review]
Fix for bug, test, and fix for test
Comment 6 User image Ed Morley [:emorley] 2012-06-19 01:19:11 PDT

Note You need to log in before you can comment on or make changes to this bug.