Closed Bug 1288382 Opened 4 years ago Closed 4 years ago

Assertion failure: Can only block on, maybe wrapped, Promise objects

Categories

(Core :: JavaScript: Standard Library, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla50
Tracking Status
firefox50 --- fixed

People

(Reporter: anba, Assigned: till)

References

Details

Attachments

(1 file)

Test case:
---
Promise.all.call(class {
  constructor(exec){ exec(()=>{}, ()=>{}); }
  static resolve() { return {then(){}}; }
}, [null])
---

Triggers the following assertion error:
---
Self-hosted JavaScript assertion info: "/home/andre/hg/mozilla-inbound/js/src/builtin/Promise.js:608: Can only block on, maybe wrapped, Promise objects"
Assertion failure: false, at /home/andre/hg/mozilla-inbound/js/src/vm/SelfHosting.cpp:401
---
Hrm, debug info again :(

Thanks for the report!
Assignee: nobody → till
Status: NEW → ASSIGNED
Attachment #8773295 - Flags: review?(efaustbmo)
Comment on attachment 8773295 [details] [diff] [review]
Don't try to add non-Promise objects to the list of dependent promises that's only used for debugging

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

r=me with comment nits

::: js/src/builtin/Promise.js
@@ +602,3 @@
>      // promises in the debugger, add a dummy reaction to the list of reject
>      // reactions that contains |blockedPromise|, but otherwise does nothing.
> +    // If the object isn't a maybe wrapped, instance of |Promise|, we ignore

prefer "maybe-wrapped instance" to "maybe wrapped, instance"

@@ +602,4 @@
>      // promises in the debugger, add a dummy reaction to the list of reject
>      // reactions that contains |blockedPromise|, but otherwise does nothing.
> +    // If the object isn't a maybe wrapped, instance of |Promise|, we ignore
> +    // it. All this does is losing some small amount of debug information

nit: "All this does is lose"
Attachment #8773295 - Flags: review?(efaustbmo) → review+
Pushed by tschneidereit@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/0e77ceaa87d9
Don't try to add non-Promise objects to the list of dependent promises that's only used for debugging. r=efaust
https://hg.mozilla.org/mozilla-central/rev/0e77ceaa87d9
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
You need to log in before you can comment on or make changes to this bug.