Last Comment Bug 781845 - GCLI should support 'then-able' promises instead of checking d.isPromise (#58)
: GCLI should support 'then-able' promises instead of checking d.isPromise (#58)
Status: RESOLVED FIXED
:
Product: Firefox
Classification: Client Software
Component: Developer Tools: Console (show other bugs)
: unspecified
: All All
: P3 normal (vote)
: Firefox 17
Assigned To: Nobody; OK to take it and work on it
:
: Brian Grinstead [:bgrins]
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-10 09:38 PDT by Joe Walker [:jwalker] (needinfo me or ping on irc)
Modified: 2012-08-27 05:21 PDT (History)
0 users
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments

Description Joe Walker [:jwalker] (needinfo me or ping on irc) 2012-08-10 09:38:09 PDT
In cli.js (around line 1075) the check on the return type for a promise is currently ...

 if (reply != null && reply.isPromise)

This is fine for the built-in context.createPromise() but could be made to work with all then-able promises by using...

 if (reply && typeof reply.then === 'function')

---
See also
https://github.com/mozilla/gcli/issues/58

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