Status

defect
RESOLVED FIXED
3 years ago
11 months ago

People

(Reporter: ntim, Assigned: nchevobbe)

Tracking

unspecified
Firefox 52
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(firefox52 fixed)

Details

Attachments

(1 attachment)

(Reporter)

Description

3 years ago
Old console:
>> var p = new Promise((resolve) => resolve(true))
<- Promise { <state>: "fulfilled", <value>: true }

New console:
>> var p = new Promise((resolve) => resolve(true))
<- Promise { }

The new console should support the old rep of Promises.
(Reporter)

Updated

3 years ago
Component: Developer Tools: Console → Developer Tools: Shared Components
Summary: New console output doesn't support representing Promises → Add rep for Promises
(Assignee)

Updated

3 years ago
Assignee: nobody → chevobbe.nicolas
Comment hidden (mozreview-request)
Comment on attachment 8803967 [details]
Bug 1310608 - Add a Rep for Promises. ;

https://reviewboard.mozilla.org/r/88150/#review88432

Nice!

R+

Just one question inline.

Honza

::: devtools/client/shared/components/reps/promise.js:47
(Diff revision 1)
> +        keys.push("value");
> +      }
> +
> +      return keys.map((key, i) => {
> +        return PropRep(Object.assign({}, this.props, {
> +          mode: "tiny",

If the promise-resoloved-value is an object we don't have it's 'grip-preview' and so, we can't display its properties, right?

(that's why 'tiny' mode is used)

Honza
Attachment #8803967 - Flags: review?(odvarko) → review+
(Assignee)

Comment 3

3 years ago
mozreview-review-reply
Comment on attachment 8803967 [details]
Bug 1310608 - Add a Rep for Promises. ;

https://reviewboard.mozilla.org/r/88150/#review88432

> If the promise-resoloved-value is an object we don't have it's 'grip-preview' and so, we can't display its properties, right?
> 
> (that's why 'tiny' mode is used)
> 
> Honza

Yes, that's true.

FYI, this is how Promise are displayed in the old console : 
`Promise.resolve({a:"b"})` is logged as "Promise { <state>: "fulfilled", <value>: Object }"

Comment 6

3 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/b7e94b82004e
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → Firefox 52

Updated

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