[JSBinding] Merging jsUnsignedLongArrayToVector() to toNativeArray() using traits.
https://bugs.webkit.org/show_bug.cgi?id=90381

Patch by Vineet Chaudhary <rgf748@motorola.com> on 2012-07-24
Reviewed by Kentaro Hara.

We can remove jsUnsignedLongArrayToVector() implementaion
merging it to current and toNativeArray() traits.

Tests: TestObj.idl
There should be no behavoiral changes as just refactoring.

* Modules/vibration/NavigatorVibration.idl: Use sequence<T> as method param than T[]
* bindings/js/JSDOMBinding.cpp: Moved toJSSequence() to header file.
* bindings/js/JSDOMBinding.h:
(WebCore::toJSSequence): Moved toJSSequence() to header file.
(WebCore::jsArray): Renamed Traits to JSValueTraits
(WebCore::toNativeArray): Using traits.
* bindings/js/JSDictionary.cpp:
(WebCore::JSDictionary::convertValue):
* bindings/js/JSMessagePortCustom.cpp:
(WebCore::fillMessagePortArray):
* bindings/scripts/CodeGeneratorJS.pm: Removed unsigned long[] specific binding code.
(AddIncludesForType):
(GenerateParametersCheckExpression):
(JSValueToNative):
(NativeToJSValue):
* bindings/scripts/CodeGeneratorV8.pm:
(GenerateParametersCheckExpression): Added check sequence<T> check for overloaded methods.
* bindings/scripts/test/JS/JSTestObj.cpp: Rebased binding test.
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod10):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod):
(WebCore::jsTestObjPrototypeFunctionMethodWithUnsignedLongSequence):
* bindings/scripts/test/JS/JSTestObj.h: Rebased binding test.
* bindings/scripts/test/TestObj.idl: Added test for sequence<T> as method parameter.
* bindings/scripts/test/V8/V8TestObj.cpp: Rebased binding test.
(WebCore::TestObjV8Internal::overloadedMethod10Callback):
(TestObjV8Internal):
(WebCore::TestObjV8Internal::overloadedMethodCallback):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123546 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed