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.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/JavaScriptCore/runtime/FunctionPrototype.cpp b/JavaScriptCore/runtime/FunctionPrototype.cpp
index f08bd5e..3475f08 100644
--- a/JavaScriptCore/runtime/FunctionPrototype.cpp
+++ b/JavaScriptCore/runtime/FunctionPrototype.cpp
@@ -25,6 +25,7 @@
#include "JSArray.h"
#include "JSFunction.h"
#include "JSString.h"
+#include "JSStringBuilder.h"
#include "Interpreter.h"
#include "Lexer.h"
#include "PrototypeFunction.h"
@@ -38,7 +39,7 @@ static JSValue JSC_HOST_CALL functionProtoFuncApply(ExecState*, JSObject*, JSVal
static JSValue JSC_HOST_CALL functionProtoFuncCall(ExecState*, JSObject*, JSValue, const ArgList&);
FunctionPrototype::FunctionPrototype(ExecState* exec, NonNullPassRefPtr<Structure> structure)
- : InternalFunction(&exec->globalData(), structure, exec->propertyNames().nullIdentifier)
+ : InternalFunction(&exec->globalData(), structure, exec->propertyNames().emptyIdentifier)
{
putDirectWithoutTransition(exec->propertyNames().length, jsNumber(exec, 0), DontDelete | ReadOnly | DontEnum);
}
@@ -90,13 +91,13 @@ JSValue JSC_HOST_CALL functionProtoFuncToString(ExecState* exec, JSObject*, JSVa
FunctionExecutable* executable = function->jsExecutable();
UString sourceString = executable->source().toString();
insertSemicolonIfNeeded(sourceString);
- return jsString(exec, makeString("function ", function->name(exec), "(", executable->paramString(), ") ", sourceString));
+ return jsMakeNontrivialString(exec, "function ", function->name(exec), "(", executable->paramString(), ") ", sourceString);
}
}
if (thisValue.inherits(&InternalFunction::info)) {
InternalFunction* function = asInternalFunction(thisValue);
- return jsString(exec, makeString("function ", function->name(exec), "() {\n [native code]\n}"));
+ return jsMakeNontrivialString(exec, "function ", function->name(exec), "() {\n [native code]\n}");
}
return throwError(exec, TypeError);