Changeset 15141
- Timestamp:
- 03/23/13 20:08:51 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/InterpreterV8.cc
r15140 r15141 330 330 return ThrowException(String::New("Argument 2 not an int32 and not a string.")); 331 331 332 if (args.Length()==3 && !args[2]->IsInt32() )333 return ThrowException(String::New("Argument 3 not an int32 ."));332 if (args.Length()==3 && !args[2]->IsInt32() && !args[2]->IsNull()) 333 return ThrowException(String::New("Argument 3 not an int32 and not null.")); 334 334 335 335 // Using a Javascript function has the advantage that it is fully … … 337 337 338 338 const string index = args[1]->IsInt32() ? "s.index" : "s.name"; 339 const bool timeout = args.Length()==3 ;339 const bool timeout = args.Length()==3 && !args[2]->IsNull(); 340 340 const string arg0 = *String::AsciiValue(args[0]); 341 341 const string state = args[1]->IsString() ? *String::AsciiValue(args[1]) : ""; … … 368 368 "})('"+arg0+"',"+arg1; 369 369 if (timeout) 370 code += "," + to_string(args[2]->Int32Value());370 code += "," + (args[2]->IsNull()?"undefined":to_string(args[2]->Int32Value())); 371 371 code += ");"; 372 372 … … 714 714 } 715 715 716 return Boolean::New(true);716 return Undefined();//Boolean::New(true); 717 717 } 718 718
Note:
See TracChangeset
for help on using the changeset viewer.