diff options
Diffstat (limited to 'Source/JavaScriptCore/API/JSContextRef.cpp')
-rw-r--r-- | Source/JavaScriptCore/API/JSContextRef.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/Source/JavaScriptCore/API/JSContextRef.cpp b/Source/JavaScriptCore/API/JSContextRef.cpp index 7a57287de..7c815355b 100644 --- a/Source/JavaScriptCore/API/JSContextRef.cpp +++ b/Source/JavaScriptCore/API/JSContextRef.cpp @@ -35,7 +35,7 @@ #include "JSClassRef.h" #include "JSGlobalObject.h" #include "JSObject.h" -#include "UStringBuilder.h" +#include <wtf/text/StringBuilder.h> #include <wtf/text/StringHash.h> #if OS(DARWIN) @@ -167,15 +167,15 @@ JSStringRef JSContextCreateBacktrace(JSContextRef ctx, unsigned maxStackSize) JSLockHolder lock(exec); unsigned count = 0; - UStringBuilder builder; + StringBuilder builder; CallFrame* callFrame = exec; - UString functionName; + String functionName; if (exec->callee()) { if (asObject(exec->callee())->inherits(&InternalFunction::s_info)) { functionName = asInternalFunction(exec->callee())->name(exec); - builder.append("#0 "); + builder.appendLiteral("#0 "); builder.append(functionName); - builder.append("() "); + builder.appendLiteral("() "); count++; } } @@ -183,10 +183,10 @@ JSStringRef JSContextCreateBacktrace(JSContextRef ctx, unsigned maxStackSize) ASSERT(callFrame); int signedLineNumber; intptr_t sourceID; - UString urlString; + String urlString; JSValue function; - UString levelStr = UString::number(count); + String levelStr = String::number(count); exec->interpreter()->retrieveLastCaller(callFrame, signedLineNumber, sourceID, urlString, function); @@ -200,20 +200,20 @@ JSStringRef JSContextCreateBacktrace(JSContextRef ctx, unsigned maxStackSize) } unsigned lineNumber = signedLineNumber >= 0 ? signedLineNumber : 0; if (!builder.isEmpty()) - builder.append("\n"); - builder.append("#"); + builder.append('\n'); + builder.append('#'); builder.append(levelStr); - builder.append(" "); + builder.append(' '); builder.append(functionName); - builder.append("() at "); + builder.appendLiteral("() at "); builder.append(urlString); - builder.append(":"); - builder.append(UString::number(lineNumber)); + builder.append(':'); + builder.appendNumber(lineNumber); if (!function || ++count == maxStackSize) break; callFrame = callFrame->callerFrame(); } - return OpaqueJSString::create(builder.toUString()).leakRef(); + return OpaqueJSString::create(builder.toString()).leakRef(); } |