Use variadic templates for jsMakeNontrivialString
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 2 Oct 2014 16:14:25 +0000 (16:14 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 2 Oct 2014 16:14:25 +0000 (16:14 +0000)
commit68d23377b5d7c03babad78b5b433fd957d3ff569
tree044252fac3de7a88474007efe7c711c4ede09a36
parent476ff20b1ee4f3d94ff9fa93818b7df42508b7c1
Use variadic templates for jsMakeNontrivialString
https://bugs.webkit.org/show_bug.cgi?id=137325

Reviewed by Sam Weinig.

* runtime/JSString.h:
(JSC::jsNontrivialString):
Add an overload that takes an rvalue reference to a String so we can transfer ownership easily.

* runtime/JSStringBuilder.h:
(JSC::jsMakeNontrivialString):
Make this a variadic function template, with a single-parameter version that can steal the string if it's OK to do so.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@174219 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/JSString.h
Source/JavaScriptCore/runtime/JSStringBuilder.h