https://bugs.webkit.org/show_bug.cgi?id=93035
Patch by Jae Hyun Park <jae.park@company100.net> on 2012-08-08
Reviewed by Adam Barth.
Use a StringBuilder instead of String concatenation because StringBuilder is generally faster.
No new functionality, so no new tests.
* bindings/v8/custom/V8HTMLDocumentCustom.cpp:
(WebCore::writeHelperGetString):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@125132
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2012-08-08 Jae Hyun Park <jae.park@company100.net>
+
+ writeHelperGetString in V8HTMLDocument uses += to concatenate strings
+ https://bugs.webkit.org/show_bug.cgi?id=93035
+
+ Reviewed by Adam Barth.
+
+ Use a StringBuilder instead of String concatenation because StringBuilder is generally faster.
+
+ No new functionality, so no new tests.
+
+ * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
+ (WebCore::writeHelperGetString):
+
2012-08-08 Adrienne Walker <enne@google.com>
[chromium] Move scrollbar pointer into WebScrollbarThemePainter
#include "V8Node.h"
#include "V8Proxy.h"
#include "V8RecursionScope.h"
+#include <wtf/text/StringBuilder.h>
#include <wtf/OwnArrayPtr.h>
#include <wtf/RefPtr.h>
#include <wtf/StdLibExtras.h>
// document.write() --> document.write("")
static String writeHelperGetString(const v8::Arguments& args)
{
- String str = "";
+ StringBuilder builder;
for (int i = 0; i < args.Length(); ++i)
- str += toWebCoreString(args[i]);
- return str;
+ builder.append(toWebCoreString(args[i]));
+ return builder.toString();
}
v8::Handle<v8::Value> V8HTMLDocument::writeCallback(const v8::Arguments& args)