Skip to content

fs: fix not found `close` creation context

Rodrigo Muino Tomonari requested to merge github/fork/anonrig/fix-node-close into main

Referencing a similar problem fixed by @santigimeno on https://github.com/nodejs/node/pull/51286#issuecomment-1869163198, this PR should fix the No creation context bug for close.

The easiest way to reproduce this is via:

const fs = require('fs')

let failed;
for (let i = 0; i < 1_000_000; i++) {
  failed = fs.readFile('./configure.py', (err, done) => {
    // do nothing
    console.log(err, done)
  })
}
console.log(failed)

Fixes https://github.com/nodejs/node/issues/53902

Merge request reports

Loading