Closed Bug 792815 Opened 8 years ago Closed 7 years ago

Update promise usage in gcli commands

Categories

(DevTools Graveyard :: Graphic Commandline and Toolbar, defect)

defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 23

People

(Reporter: miker, Assigned: sykopomp)

References

Details

Attachments

(1 file)

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
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
Attached patch v1Splinter Review
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]
woot! First accepted patch! Thanks! :)
Blocks: 855124
https://hg.mozilla.org/mozilla-central/rev/8f2cda813c78
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 23
Product: Firefox → DevTools
Product: DevTools → DevTools Graveyard
You need to log in before you can comment on or make changes to this bug.