summaryrefslogtreecommitdiffstats
path: root/JavaScriptCore/runtime/ArrayPrototype.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'JavaScriptCore/runtime/ArrayPrototype.cpp')
-rw-r--r--JavaScriptCore/runtime/ArrayPrototype.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/JavaScriptCore/runtime/ArrayPrototype.cpp b/JavaScriptCore/runtime/ArrayPrototype.cpp
index 5b359e7..ce814b2 100644
--- a/JavaScriptCore/runtime/ArrayPrototype.cpp
+++ b/JavaScriptCore/runtime/ArrayPrototype.cpp
@@ -204,8 +204,7 @@ JSValue JSC_HOST_CALL arrayProtoFuncToString(ExecState* exec, JSObject*, JSValue
buffer.append(rep->data(), rep->size());
}
ASSERT(buffer.size() == totalSize);
- unsigned finalSize = buffer.size();
- return jsString(exec, UString(buffer.releaseBuffer(), finalSize, false));
+ return jsString(exec, UString::adopt(buffer));
}
JSValue JSC_HOST_CALL arrayProtoFuncToLocaleString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&)