Last Comment Bug 734294 - when installing an app the InstallTime is returning undefined
: when installing an app the InstallTime is returning undefined
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: DOM: Apps (show other bugs)
: unspecified
: All All
: -- normal (vote)
: mozilla16
Assigned To: Ian Bicking (:ianb)
:
:
Mentors:
Depends on:
Blocks: 720415 746465
  Show dependency treegraph
 
Reported: 2012-03-08 17:15 PST by dclarke@mozilla.com [:onecyrenus]
Modified: 2012-07-28 09:25 PDT (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Fix for bug, plus test (1.70 KB, patch)
2012-06-11 18:46 PDT, Ian Bicking (:ianb)
fabrice: review+
Details | Diff | Splinter Review
Fix with nit addressed (1.69 KB, patch)
2012-06-18 10:04 PDT, Ian Bicking (:ianb)
myk: checkin+
Details | Diff | Splinter Review

Description dclarke@mozilla.com [:onecyrenus] 2012-03-08 17:15:49 PST
navigator.mozApps.install in onSuccess

installTime = undefined

This is on mozilla-central.
Comment 1 dclarke@mozilla.com [:onecyrenus] 2012-03-22 03:48:48 PDT
The difference I was seeing with the HTML / JS implementation here is that installTime in the onSuccess handler whereas in ff it is not. 

It seems more natural for this to be returned later in getInstalled, which is the way ff does it .
Comment 2 Ian Bicking (:ianb) 2012-06-11 18:46:31 PDT
Created attachment 632103 [details] [diff] [review]
Fix for bug, plus test

One-line fix, plus MochiTest
Comment 3 [:fabrice] Fabrice Desré 2012-06-11 21:33:05 PDT
Comment on attachment 632103 [details] [diff] [review]
Fix for bug, plus test

Review of attachment 632103 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks!

::: dom/apps/src/Webapps.jsm
@@ +181,4 @@
>      }
>  
>      let appObject = this._cloneAppObject(app);
> +    appObject.installTime = app.installTime = (new Date()).getTime();

Nit: Date.now() is fine also
Comment 4 Ian Bicking (:ianb) 2012-06-18 10:04:55 PDT
Created attachment 634085 [details] [diff] [review]
Fix with nit addressed
Comment 5 Myk Melez [:myk] [@mykmelez] 2012-06-18 14:40:56 PDT
Comment on attachment 634085 [details] [diff] [review]
Fix with nit addressed

https://hg.mozilla.org/integration/mozilla-inbound/rev/92aa87e1e876
Comment 6 Ed Morley [:emorley] 2012-06-19 01:19:16 PDT
https://hg.mozilla.org/mozilla-central/rev/92aa87e1e876

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