Last Comment Bug 792815 - Update promise usage in gcli commands
: Update promise usage in gcli commands
Status: RESOLVED FIXED
:
Product: Firefox
Classification: Client Software
Component: Developer Tools: Graphic Commandline and Toolbar (show other bugs)
: unspecified
: All All
: -- normal (vote)
: Firefox 23
Assigned To: Josh Marchán
:
:
Mentors:
Depends on:
Blocks: 855124 851801
  Show dependency treegraph
 
Reported: 2012-09-20 06:08 PDT by Michael Ratcliffe [:miker] [:mratcliffe]
Modified: 2013-05-14 16:50 PDT (History)
7 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
v1 (5.66 KB, patch)
2013-03-30 21:54 PDT, Josh Marchán
jwalker: review+
Details | Diff | Splinter Review

Description Michael Ratcliffe [:miker] [:mratcliffe] 2012-09-20 06:08:06 PDT
We often use this:
let promise = context.createPromise();

To quote Joe:
That's sooooo 2012. The NEW IMPROVED way is:

var deferred = context.defer();
setTimeout(function() {
  deferred.resolve("hello");
}, 500);
return deferred.promise;

This should be updated across all gcli commands.
Comment 1 Paul Rouget [:paul] 2012-12-04 03:07:43 PST
Bug triage, filter on PINKISBEAUTIFUL
Comment 2 Joe Walker [:jwalker] (needinfo me or ping on irc) 2012-12-21 02:54:02 PST
New component triage. Filter on "Lobster Thermidor aux crevettes with a Mornay sauce"
Comment 3 Josh Marchán 2013-03-30 21:54:26 PDT
Created attachment 731609 [details] [diff] [review]
v1

These are the only ones left. createPromise() can be safely removed from gcli after this patch.
Comment 4 Joe Walker [:jwalker] (needinfo me or ping on irc) 2013-04-03 02:25:24 PDT
Comment on attachment 731609 [details] [diff] [review]
v1

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

Excellent, thanks. I'll add this to my landing list.
Comment 5 Josh Marchán 2013-04-03 06:25:11 PDT
woot! First accepted patch! Thanks! :)
Comment 6 Panos Astithas [:past] 2013-04-10 02:17:07 PDT
https://hg.mozilla.org/integration/fx-team/rev/8f2cda813c78
Comment 7 Ryan VanderMeulen [:RyanVM] 2013-04-10 11:44:17 PDT
https://hg.mozilla.org/mozilla-central/rev/8f2cda813c78

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