Changeset 15150


Ignore:
Timestamp:
03/25/13 09:52:31 (12 years ago)
Author:
tbretz
Message:
dim.wait now uses undefined instead of null as the value for infinite wait.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/InterpreterV8.cc

    r15143 r15150  
    330330        return ThrowException(String::New("Argument 2 not an int32 and not a string."));
    331331
    332     if (args.Length()==3 && !args[2]->IsInt32() && !args[2]->IsNull())
     332    if (args.Length()==3 && !args[2]->IsInt32() && !args[2]->IsUndefined())
    333333        return ThrowException(String::New("Argument 3 not an int32 and not null."));
    334334
     
    337337
    338338    const string index   = args[1]->IsInt32() ? "s.index" : "s.name";
    339     const bool   timeout = args.Length()==3 && !args[2]->IsNull();
     339    const bool   timeout = args.Length()==3 && !args[2]->IsUndefined();
    340340    const string arg0    = *String::AsciiValue(args[0]);
    341341    const string state   = args[1]->IsString() ? *String::AsciiValue(args[1]) : "";
     
    368368                   "})('"+arg0+"',"+arg1;
    369369    if (timeout)
    370         code +=    "," + (args[2]->IsNull()?"undefined":to_string(args[2]->Int32Value()));
     370        code +=    "," + (args[2]->IsUndefined()?"undefined":to_string(args[2]->Int32Value()));
    371371    code +=        ");";
    372372
Note: See TracChangeset for help on using the changeset viewer.