Changeset 11525 in webkit for trunk/JavaScriptCore/kjs/bool_object.cpp
- Timestamp:
- Dec 10, 2005, 4:38:07 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/bool_object.cpp
r10701 r11525 56 56 putDirect(toStringPropertyName, new BooleanProtoFuncImp(exec,funcProto,BooleanProtoFuncImp::ToString,0), DontEnum); 57 57 putDirect(valueOfPropertyName, new BooleanProtoFuncImp(exec,funcProto,BooleanProtoFuncImp::ValueOf,0), DontEnum); 58 setInternalValue( Boolean(false));58 setInternalValue(jsBoolean(false)); 59 59 } 60 60 … … 89 89 90 90 if (id == ToString) 91 return String(v->toString(exec));92 return Boolean(v->toBoolean(exec)); /* TODO: optimize for bool case */91 return jsString(v->toString(exec)); 92 return jsBoolean(v->toBoolean(exec)); /* TODO: optimize for bool case */ 93 93 } 94 94 … … 103 103 104 104 // no. of arguments for constructor 105 putDirect(lengthPropertyName, js One(), ReadOnly|DontDelete|DontEnum);105 putDirect(lengthPropertyName, jsNumber(1), ReadOnly|DontDelete|DontEnum); 106 106 } 107 107 … … 137 137 { 138 138 if (args.isEmpty()) 139 return Boolean(false);139 return jsBoolean(false); 140 140 else 141 return Boolean(args[0]->toBoolean(exec)); /* TODO: optimize for bool case */141 return jsBoolean(args[0]->toBoolean(exec)); /* TODO: optimize for bool case */ 142 142 } 143 143
Note:
See TracChangeset
for help on using the changeset viewer.