diff options
Diffstat (limited to 'Source/JavaScriptCore/runtime/FunctionPrototype.cpp')
-rw-r--r-- | Source/JavaScriptCore/runtime/FunctionPrototype.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Source/JavaScriptCore/runtime/FunctionPrototype.cpp b/Source/JavaScriptCore/runtime/FunctionPrototype.cpp index 4206cf2b0..455a21877 100644 --- a/Source/JavaScriptCore/runtime/FunctionPrototype.cpp +++ b/Source/JavaScriptCore/runtime/FunctionPrototype.cpp @@ -47,7 +47,7 @@ FunctionPrototype::FunctionPrototype(JSGlobalObject* globalObject, Structure* st { } -void FunctionPrototype::finishCreation(ExecState* exec, const UString& name) +void FunctionPrototype::finishCreation(ExecState* exec, const String& name) { Base::finishCreation(exec->globalData(), name); putDirectWithoutTransition(exec->globalData(), exec->propertyNames().length, jsNumber(0), DontDelete | ReadOnly | DontEnum); @@ -55,16 +55,16 @@ void FunctionPrototype::finishCreation(ExecState* exec, const UString& name) void FunctionPrototype::addFunctionProperties(ExecState* exec, JSGlobalObject* globalObject, JSFunction** callFunction, JSFunction** applyFunction) { - JSFunction* toStringFunction = JSFunction::create(exec, globalObject, 0, exec->propertyNames().toString.ustring(), functionProtoFuncToString); + JSFunction* toStringFunction = JSFunction::create(exec, globalObject, 0, exec->propertyNames().toString.string(), functionProtoFuncToString); putDirectWithoutTransition(exec->globalData(), exec->propertyNames().toString, toStringFunction, DontEnum); - *applyFunction = JSFunction::create(exec, globalObject, 2, exec->propertyNames().apply.ustring(), functionProtoFuncApply); + *applyFunction = JSFunction::create(exec, globalObject, 2, exec->propertyNames().apply.string(), functionProtoFuncApply); putDirectWithoutTransition(exec->globalData(), exec->propertyNames().apply, *applyFunction, DontEnum); - *callFunction = JSFunction::create(exec, globalObject, 1, exec->propertyNames().call.ustring(), functionProtoFuncCall); + *callFunction = JSFunction::create(exec, globalObject, 1, exec->propertyNames().call.string(), functionProtoFuncCall); putDirectWithoutTransition(exec->globalData(), exec->propertyNames().call, *callFunction, DontEnum); - JSFunction* bindFunction = JSFunction::create(exec, globalObject, 1, exec->propertyNames().bind.ustring(), functionProtoFuncBind); + JSFunction* bindFunction = JSFunction::create(exec, globalObject, 1, exec->propertyNames().bind.string(), functionProtoFuncBind); putDirectWithoutTransition(exec->globalData(), exec->propertyNames().bind, bindFunction, DontEnum); } @@ -83,7 +83,7 @@ CallType FunctionPrototype::getCallData(JSCell*, CallData& callData) // Functions // Compatibility hack for the Optimost JavaScript library. (See <rdar://problem/6595040>.) -static inline void insertSemicolonIfNeeded(UString& functionBody) +static inline void insertSemicolonIfNeeded(String& functionBody) { ASSERT(functionBody[0] == '{'); ASSERT(functionBody[functionBody.length() - 1] == '}'); @@ -92,7 +92,7 @@ static inline void insertSemicolonIfNeeded(UString& functionBody) UChar ch = functionBody[i]; if (!Lexer<UChar>::isWhiteSpace(ch) && !Lexer<UChar>::isLineTerminator(ch)) { if (ch != ';' && ch != '}') - functionBody = makeUString(functionBody.substringSharingImpl(0, i + 1), ";", functionBody.substringSharingImpl(i + 1, functionBody.length() - (i + 1))); + functionBody = makeString(functionBody.substringSharingImpl(0, i + 1), ";", functionBody.substringSharingImpl(i + 1, functionBody.length() - (i + 1))); return; } } @@ -106,7 +106,7 @@ EncodedJSValue JSC_HOST_CALL functionProtoFuncToString(ExecState* exec) if (function->isHostFunction()) return JSValue::encode(jsMakeNontrivialString(exec, "function ", function->name(exec), "() {\n [native code]\n}")); FunctionExecutable* executable = function->jsExecutable(); - UString sourceString = executable->source().toString(); + String sourceString = executable->source().toString(); insertSemicolonIfNeeded(sourceString); return JSValue::encode(jsMakeNontrivialString(exec, "function ", function->name(exec), "(", executable->paramString(), ") ", sourceString)); } |