diff options
author | rentzsch <jwr.git@redshed.net> | 2010-05-08 01:09:29 -0500 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2010-05-08 19:52:22 -0700 |
commit | a5b132ad630b843e822a332cef8c69efd6f86391 (patch) | |
tree | 97febebbd203acf40f7842e00f5c5438aea4d0f1 | |
parent | 3ac6deefa8112a285fb578875c0aa8eb741e1e23 (diff) | |
download | nodejs-a5b132ad630b843e822a332cef8c69efd6f86391.tar.gz nodejs-a5b132ad630b843e822a332cef8c69efd6f86391.tar.bz2 nodejs-a5b132ad630b843e822a332cef8c69efd6f86391.zip |
fs.Stats.size V8::Integer => V8::Number.
While VM::Integer::Value() offers an int64_t, V8::Integer::New() only
accepts an int32_t, truncating fs.Stat's size in BuildStatsObject().
I consider this a bug in V8, and we should move back to V8::Integer
when it gets a ctr that allows a int64_t. Until then, this work-around
should hold.
-rw-r--r-- | src/node.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/node.cc b/src/node.cc index 6e582176f..e8bfcf8d8 100644 --- a/src/node.cc +++ b/src/node.cc @@ -928,7 +928,7 @@ Local<Object> BuildStatsObject(struct stat * s) { stats->Set(rdev_symbol, Integer::New(s->st_rdev)); /* total size, in bytes */ - stats->Set(size_symbol, Integer::New(s->st_size)); + stats->Set(size_symbol, Number::New(s->st_size)); /* blocksize for filesystem I/O */ stats->Set(blksize_symbol, Integer::New(s->st_blksize)); |