Skip to content

move things away from process.binding('util') #30884

Description

@joyeecheung

process.binding('util') has been some kind of hotch-potch of "bindings the JS internals need but don't fall in the scope of a particular binding namespace". There is no compatibility guarantee about what's in this object and changes to it are completely at the whims of Node.js maintainers.

However process.binding('util') has been accessible in the user land and is abused by users (refs: #29947 (comment) - considering how volatile it is, when touching this binding I had always been wondering if anyone actually abuses this, until I saw the issue). I propose we try creating a new, internal namespace (that is, a namespace that's not in the whitelist here) and try moving everything away to that internal namespace to reduce the abuse.

On a side note, I think there should be a comment in node_utils.cc warning that any additions to the binding is at the risk of user-land abuse.

Activity

  1. juanarbol commented on Dec 11, 2019

    @juanarbol
    Member

    I will work on this, do you have any specific name for that binding? And what methods should be on that binding.

  2. joyeecheung commented on Dec 12, 2019

    @joyeecheung
    MemberAuthor

    @juanarbol I guess something like "internal_util" would work (though I am bad at naming stuff). I think you can start by git blaming the Initialize function in node_util.cc and starting from the most recent addition.

  3. added
    lib / srcIssues and PRs involving general changes in the lib/ or src/ directories.
    on Dec 20, 2019
  4. SnirBroshi commented on Oct 4, 2022

    @SnirBroshi

    Wasn't this fixed by #37819?

  5. github-actions commented on Jun 27, 2026

    @github-actions
    Contributor

    This issue has been marked as stale due to 210 days of inactivity.
    It will be automatically closed in 30 days if no further activity occurs. If this is still relevant, please leave a comment or update it to keep it open.

  6. github-actions commented on Jul 28, 2026

    @github-actions
    Contributor

    This issue has been automatically closed after 30 days of inactivity following its stale status (no activity for a total of 120 days).
    If this is still relevant, feel free to reopen it or leave a comment with additional details so we can continue the discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    lib / srcIssues and PRs involving general changes in the lib/ or src/ directories.staleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions