Source/JavaScriptCore: [JSC] WebKit allocates gigabytes of memory when doing repeated...
authorbarraclough@apple.com <barraclough@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 Jul 2011 20:03:13 +0000 (20:03 +0000)
committerbarraclough@apple.com <barraclough@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 Jul 2011 20:03:13 +0000 (20:03 +0000)
commit7c34b52bdd6546cd56fd7b667fa15fb758b19a8a
tree20e0195e8d64f08514f62d5a02a87a062c3725cf
parent3d3181f7a02b79ff0307eff45398dbb475dd9682
Source/JavaScriptCore: [JSC] WebKit allocates gigabytes of memory when doing repeated string concatenation
https://bugs.webkit.org/show_bug.cgi?id=63918

Patch by Mark Hahnenberg <mhahnenberg@apple.com> on 2011-07-19
Reviewed by Darin Adler.

When allocating JSStrings during concatenation, we needed to call the Heap's reportExtraMemoryCost
method due to additional string copying within several of the constructors when dealing with
UStrings.  This has been added to the UString version of the appendStringInConstruct method
within the JSString class.

* runtime/JSString.h:
(JSC::RopeBuilder::JSString):
(JSC::RopeBuilder::appendStringInConstruct):

LayoutTests: Chromium rebaselines r91269 and r91277.

Patch by Ryosuke Niwa <rniwa@webkit.org> on 2011-07-19

* platform/chromium-linux/svg/W3C-SVG-1.1-SE/styling-pres-02-f-expected.png: Added.
* platform/chromium-mac/fast/table/align-right-within-left-aligned-div-expected.png: Added.
* platform/chromium-mac/fast/table/align-right-within-left-aligned-div-expected.txt: Added.
* platform/chromium-mac/svg/W3C-SVG-1.1-SE/styling-pres-02-f-expected.png: Added.
* platform/chromium-win/svg/W3C-SVG-1.1-SE/styling-pres-02-f-expected.png: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@91290 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/js/array-prototype-properties-expected.txt [new file with mode: 0644]
LayoutTests/fast/js/array-prototype-properties.html [new file with mode: 0644]
LayoutTests/fast/js/script-tests/array-prototype-properties.js [new file with mode: 0644]
LayoutTests/ietestcenter/Javascript/15.4.4.14-5-28-expected.txt
LayoutTests/ietestcenter/Javascript/15.4.4.15-5-28-expected.txt
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/ArrayPrototype.cpp