codebytere

#48811: refactor: remove allow_unsafe_buffers pragma from FD_ZERO

Merged
Created: Nov 6, 2025, 2:44:39 AM
Merged: Nov 7, 2025, 4:23:52 AM
1 comments
Target: main

Description of Change

Remove allow_unsafe_buffers in node_binding_mac to address an outstanding TODO from #46482

Refactors NodeBindingsMac::PollEvents() to use poll() instead of select()/fd_set, removing reliance on FD_ZERO/FD_SET and eliminating the need for unsafe buffer allowances. Behavior (blocking until libuv backend fd is readable or timeout expires, with EINTR retry and infinite wait support) should remain the same.

Checklist

Release Notes

Notes: none

Backports

No Backports Requested

This pull request doesn't have any backports requested or created for older release branches.

What are backports?

Backports are copies of changes made to the main branch that are applied to older release branches. They ensure that bug fixes and important changes are available in maintained older versions of Electron.

Semver Impact

Major
Breaking changes
Minor
New features
Patch
Bug fixes
None
Docs, tests, etc.

Semantic Versioning helps users understand the impact of updates:

  • Major (X.y.z): Breaking changes that may require code modifications
  • Minor (x.Y.z): New features that maintain backward compatibility
  • Patch (x.y.Z): Bug fixes that don't change the API
  • None: Changes that don't affect using facing parts of Electron