Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[emitter] Fix sparse array handling in EventEmitter#listeners() #24546

Closed
wants to merge 1 commit into from

Commits on Apr 21, 2019

  1. [emitter] Fix sparse array handling in EventEmitter#listeners()

    Fixes a regression in facebook@1f8b46a#diff-141db70a3fb9a501015e4cb2508e3a65. The internal subscription vendor uses a sparse array to track listeners, which makes listener removal fast. When querying listeners, the sparse entries need to be removed. `Array#filter` is a built-in way to do this -> linked to the JS spec, which explains this.
    ide committed Apr 21, 2019
    Configuration menu
    Copy the full SHA
    7db6fa1 View commit details
    Browse the repository at this point in the history