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:
Vladimir Kurchatkin 2015-06-05 10:37:11 +03:00
Родитель 81029c639a
Коммит 2dcef83b5f
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -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;