summaryrefslogtreecommitdiffstats
path: root/JavaScriptCore/runtime/FunctionPrototype.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'JavaScriptCore/runtime/FunctionPrototype.cpp')
-rw-r--r--JavaScriptCore/runtime/FunctionPrototype.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/JavaScriptCore/runtime/FunctionPrototype.cpp b/JavaScriptCore/runtime/FunctionPrototype.cpp
index a3a7479..f08bd5e 100644
--- a/JavaScriptCore/runtime/FunctionPrototype.cpp
+++ b/JavaScriptCore/runtime/FunctionPrototype.cpp
@@ -76,7 +76,7 @@ static inline void insertSemicolonIfNeeded(UString& functionBody)
UChar ch = functionBody[i];
if (!Lexer::isWhiteSpace(ch) && !Lexer::isLineTerminator(ch)) {
if (ch != ';' && ch != '}')
- functionBody = functionBody.substr(0, i + 1) + ";" + functionBody.substr(i + 1, functionBody.size() - (i + 1));
+ functionBody = makeString(functionBody.substr(0, i + 1), ";", functionBody.substr(i + 1, functionBody.size() - (i + 1)));
return;
}
}
@@ -90,13 +90,13 @@ JSValue JSC_HOST_CALL functionProtoFuncToString(ExecState* exec, JSObject*, JSVa
FunctionExecutable* executable = function->jsExecutable();
UString sourceString = executable->source().toString();
insertSemicolonIfNeeded(sourceString);
- return jsString(exec, "function " + function->name(exec) + "(" + executable->paramString() + ") " + sourceString);
+ return jsString(exec, makeString("function ", function->name(exec), "(", executable->paramString(), ") ", sourceString));
}
}
if (thisValue.inherits(&InternalFunction::info)) {
InternalFunction* function = asInternalFunction(thisValue);
- return jsString(exec, "function " + function->name(exec) + "() {\n [native code]\n}");
+ return jsString(exec, makeString("function ", function->name(exec), "() {\n [native code]\n}"));
}
return throwError(exec, TypeError);