Changeset 11525 in webkit for trunk/JavaScriptCore/kjs/function_object.cpp
- Timestamp:
- Dec 10, 2005, 4:38:07 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/function_object.cpp
r11375 r11525 41 41 FunctionPrototypeImp::FunctionPrototypeImp(ExecState *exec) 42 42 { 43 putDirect(lengthPropertyName, js Zero(), DontDelete|ReadOnly|DontEnum);43 putDirect(lengthPropertyName, jsNumber(0), DontDelete|ReadOnly|DontEnum); 44 44 putDirect(toStringPropertyName, new FunctionProtoFuncImp(exec, this, FunctionProtoFuncImp::ToString, 0), DontEnum); 45 45 static const Identifier applyPropertyName("apply"); … … 61 61 ValueImp *FunctionPrototypeImp::callAsFunction(ExecState */*exec*/, ObjectImp */*thisObj*/, const List &/*args*/) 62 62 { 63 return Undefined();63 return jsUndefined(); 64 64 } 65 65 … … 95 95 DeclaredFunctionImp *fi = static_cast<DeclaredFunctionImp*> 96 96 (thisObj); 97 return String("function " + fi->name().ustring() + "(" +97 return jsString("function " + fi->name().ustring() + "(" + 98 98 fi->parameterString() + ") " + fi->body->toString()); 99 99 } else if (thisObj->inherits(&FunctionImp::info) && 100 100 !static_cast<FunctionImp*>(thisObj)->name().isNull()) { 101 result = String("function " + static_cast<FunctionImp*>(thisObj)->name().ustring() + "()");101 result = jsString("function " + static_cast<FunctionImp*>(thisObj)->name().ustring() + "()"); 102 102 } 103 103 else { 104 result = String("(Internal Function)");104 result = jsString("(Internal Function)"); 105 105 } 106 106 } … … 166 166 167 167 // no. of arguments for constructor 168 putDirect(lengthPropertyName, js One(), ReadOnly|DontDelete|DontEnum);168 putDirect(lengthPropertyName, jsNumber(1), ReadOnly|DontDelete|DontEnum); 169 169 } 170 170
Note:
See TracChangeset
for help on using the changeset viewer.