Make some optimizations for DOM bindings involving vectors
authordarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 13 Dec 2013 16:27:54 +0000 (16:27 +0000)
committerdarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 13 Dec 2013 16:27:54 +0000 (16:27 +0000)
commit3e18f09a7d86924f963ee7bacf7f61df8ba08e79
treed118deeb8adb511cf123d5019b885de93ef2b79a
parent02229a0a9f1d3583d5cf3b1c558176bae3a46e8c
Make some optimizations for DOM bindings involving vectors
https://bugs.webkit.org/show_bug.cgi?id=125680

Reviewed by Andreas Kling.

* bindings/js/JSDOMBinding.h:
(WebCore::toJS): Removed unnecessary copying of vectors when converting them
to JavaScript values.
(WebCore::toRefPtrNativeArray): Use reserveInitialCapacity and uncheckedAppend.
(WebCore::toNativeArray): Ditto.
(WebCore::toNativeArguments): Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@160546 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/bindings/js/JSDOMBinding.h