Reviewed by Darin.
[WebKit-https.git] / JavaScriptCore / kjs / function_object.cpp
index f10f3995be452256c007a9ffc7391b9052bec838..47d74c6ad19fba8d067b216ab3cb8b15e7c88b0d 100644 (file)
@@ -83,7 +83,7 @@ JSValue* FunctionProtoFunc::callAsFunction(ExecState* exec, JSObject* thisObj, c
     if (thisObj->inherits(&DeclaredFunctionImp::info)) {
         DeclaredFunctionImp *fi = static_cast<DeclaredFunctionImp*>(thisObj);
         return jsString("function " + fi->functionName().ustring() + "(" +
     if (thisObj->inherits(&DeclaredFunctionImp::info)) {
         DeclaredFunctionImp *fi = static_cast<DeclaredFunctionImp*>(thisObj);
         return jsString("function " + fi->functionName().ustring() + "(" +
-                        fi->parameterString() + ") " + fi->body->toString());
+                        fi->body->paramString() + ") " + fi->body->toString());
      } else if (thisObj->inherits(&InternalFunctionImp::info) &&
                 !static_cast<InternalFunctionImp*>(thisObj)->functionName().isNull()) {
        result = jsString("\nfunction " + static_cast<InternalFunctionImp*>(thisObj)->functionName().ustring() + "() {\n"
      } else if (thisObj->inherits(&InternalFunctionImp::info) &&
                 !static_cast<InternalFunctionImp*>(thisObj)->functionName().isNull()) {
        result = jsString("\nfunction " + static_cast<InternalFunctionImp*>(thisObj)->functionName().ustring() + "() {\n"
@@ -228,11 +228,11 @@ JSObject* FunctionObjectImp::construct(ExecState* exec, const List& args, const
           while (i < len && *c == ' ')
               c++, i++;
           if (i == len) {
           while (i < len && *c == ' ')
               c++, i++;
           if (i == len) {
-              fimp->addParameter(Identifier(param));
+              bodyNode->addParam(Identifier(param));
               params++;
               break;
           } else if (*c == ',') {
               params++;
               break;
           } else if (*c == ',') {
-              fimp->addParameter(Identifier(param));
+              bodyNode->addParam(Identifier(param));
               params++;
               c++, i++;
               continue;
               params++;
               c++, i++;
               continue;