diff --git a/src/node.cc b/src/node.cc index b5736c68033..957524b41ba 100644 --- a/src/node.cc +++ b/src/node.cc @@ -410,6 +410,7 @@ static Handle ByteLength(const Arguments& args) { static Handle Loop(const Arguments& args) { HandleScope scope; + assert(args.Length() == 0); // TODO Probably don't need to start this each time. // Avoids failing on test/mjsunit/test-eio-race3.js though @@ -453,6 +454,7 @@ static Handle Chdir(const Arguments& args) { static Handle Cwd(const Arguments& args) { HandleScope scope; + assert(args.Length() == 0); char output[PATH_MAX]; char *r = getcwd(output, PATH_MAX); @@ -484,12 +486,14 @@ static Handle Umask(const Arguments& args){ static Handle GetUid(const Arguments& args) { HandleScope scope; + assert(args.Length() == 0); int uid = getuid(); return scope.Close(Integer::New(uid)); } static Handle GetGid(const Arguments& args) { HandleScope scope; + assert(args.Length() == 0); int gid = getgid(); return scope.Close(Integer::New(gid)); } @@ -497,10 +501,10 @@ static Handle GetGid(const Arguments& args) { static Handle SetGid(const Arguments& args) { HandleScope scope; - + if (args.Length() < 1) { return ThrowException(Exception::Error( - String::New("setgid requires 1 argument"))); + String::New("setgid requires 1 argument"))); } Local given_gid = args[0]->ToInteger(); @@ -735,6 +739,7 @@ error: v8::Handle MemoryUsage(const v8::Arguments& args) { HandleScope scope; + assert(args.Length() == 0); #ifndef HAVE_GETMEM return ThrowException(Exception::Error(String::New("Not support on your platform. (Talk to Ryan.)"))); @@ -860,7 +865,7 @@ Handle EvalCX(const Arguments& args) { // Copy objects from global context, to our brand new context Handle keys = sandbox->GetPropertyNames(); - int i; + unsigned int i; for (i = 0; i < keys->Length(); i++) { Handle key = keys->Get(Integer::New(i))->ToString(); Handle value = sandbox->Get(key); @@ -1003,6 +1008,7 @@ static void DebugMessageDispatch(void) { static Handle CheckBreak(const Arguments& args) { HandleScope scope; + assert(args.Length() == 0); // TODO FIXME This function is a hack to wait until V8 is ready to accept // commands. There seems to be a bug in EnableAgent( _ , _ , true) which