You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fn.bind() on a native-module namespace function (zlib.inflate.bind(zlib)) evaluates to undefined #11268
fn.bind(...) on a function taken from a native Node module namespace evaluates to undefined:
import*aszlibfrom"zlib";console.log(typeofzlib.inflate,typeofzlib.inflate.bind(zlib));// Node: function function; Perry: function undefined
mongodb 7.0.0 hits this during compression.ts startup (zlib.inflate.bind(zlib)) and then throws ERR_INVALID_ARG_TYPE. Found while validating #11267 on the mongodb removal branch.
Check .call/.apply/.bind/.name/.length on native-module functions reached both as ns.fn and through a variable, for zlib, crypto, fs and util. It may be related to #11175 (Function.call.bind), which has fix PR #11223.
Activity
test: cover Function.prototype methods on native module exports (#11268)