fs: use `kMaxLength` from binding
This allows `graceful-fs` to evaluate `fs` source without access to internals. This is a temporary workaround that makes npm work. See: https://github.com/isaacs/node-graceful-fs/issues/41 Fixes: https://github.com/nodejs/io.js/issues/1898 PR-URL: https://github.com/nodejs/io.js/pull/1903 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
This commit is contained in:
Родитель
81029c639a
Коммит
2dcef83b5f
|
@ -19,7 +19,7 @@ const Readable = Stream.Readable;
|
|||
const Writable = Stream.Writable;
|
||||
|
||||
const kMinPoolSpace = 128;
|
||||
const kMaxLength = require('internal/smalloc').kMaxLength;
|
||||
const kMaxLength = process.binding('smalloc').kMaxLength;
|
||||
|
||||
const O_APPEND = constants.O_APPEND || 0;
|
||||
const O_CREAT = constants.O_CREAT || 0;
|
||||
|
|
Загрузка…
Ссылка в новой задаче