Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fs: use kMaxLength from binding #1903

Closed
wants to merge 1 commit into from

Conversation

vkurchatkin
Copy link
Contributor

This allows userland modules to evaluate fs source
without access to internals.

Fixes: #1898

R=@evanlucas

@@ -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;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Femto-nit: you have one space too many after the '='.

@bnoordhuis
Copy link
Member

LGTM with style nit. Can you update the commit log to explicitly call out graceful-fs and add a link to the issue you filed there? I don't want people to construe this change as an implicit promise of support for eval-ing core modules.

@vkurchatkin
Copy link
Contributor Author

@bnoordhuis PTAL at the message

@bnoordhuis
Copy link
Member

LGTM but can you use Refs: https://github.com/isaacs/node-graceful-fs/issues/41 at the bottom?

@bnoordhuis
Copy link
Member

Sorry, I mean: See: <url>

EDIT: The commit history is a bit inconsistent in its use of Refs vs. See.

This allows `graceful-fs` to evaluate `fs` source
without access to internals.

This is a temporary workaround that makes npm work.

See: isaacs/node-graceful-fs#41
Fixes: nodejs#1898
vkurchatkin added a commit that referenced this pull request Jun 5, 2015
This allows `graceful-fs` to evaluate `fs` source
without access to internals.

This is a temporary workaround that makes npm work.

See: isaacs/node-graceful-fs#41
Fixes: #1898
PR-URL: #1903
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
@vkurchatkin
Copy link
Contributor Author

Landed in 2dcef83

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants