Update promise usage in gcli commands

RESOLVED FIXED in Firefox 23

Status

RESOLVED FIXED
6 years ago
2 months ago

People

(Reporter: miker, Assigned: sykopomp)

Tracking

unspecified
Firefox 23
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

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.
Status: NEW → ASSIGNED

Comment 1

6 years ago
Bug triage, filter on PINKISBEAUTIFUL
Component: Developer Tools: Inspector → Developer Tools
New component triage. Filter on "Lobster Thermidor aux crevettes with a Mornay sauce"
Component: Developer Tools → Developer Tools: Graphic Commandline and Toolbar
Assignee: mratcliffe → nobody
(Assignee)

Comment 3

6 years ago
Created attachment 731609 [details] [diff] [review]
v1

These are the only ones left. createPromise() can be safely removed from gcli after this patch.
Attachment #731609 - Flags: review?(mratcliffe)
Attachment #731609 - Flags: review?(jwalker)
Assignee: nobody → sykopomp
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.
Attachment #731609 - Flags: review?(mratcliffe)
Attachment #731609 - Flags: review?(jwalker)
Attachment #731609 - Flags: review+
Whiteboard: [gclicommands] → [land-in-fx-team]
(Assignee)

Comment 5

6 years ago
woot! First accepted patch! Thanks! :)
(Assignee)

Updated

6 years ago
Blocks: 855124
https://hg.mozilla.org/integration/fx-team/rev/8f2cda813c78
Whiteboard: [land-in-fx-team] → [fixed-in-fx-team]
https://hg.mozilla.org/mozilla-central/rev/8f2cda813c78
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 23

Updated

5 months ago
Product: Firefox → DevTools

Updated

2 months ago
Product: DevTools → DevTools Graveyard
You need to log in before you can comment on or make changes to this bug.