Skip to content

Promise.resolve(thenable) executes thenable.then synchronously #105

@domenic

Description

@domenic

From getify/native-promise-only#5

As I understand it, this is really bad, as then the thenable can break the surrounding code's invariants. @erights @kriskowal can confirm.

I think the fix for this is pretty simple, and will be proposing it in a pull request shortly. (Just wrap the then call in an EnqueueTask, essentially).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions