[JSC] Add [ConstructorParameters=] to all custom constructors
authorharaken@chromium.org <haraken@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 27 Feb 2012 23:59:55 +0000 (23:59 +0000)
committerharaken@chromium.org <haraken@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 27 Feb 2012 23:59:55 +0000 (23:59 +0000)
commitb43f45ebbf7d7f83c08b1dc7d290c3abf287ee73
tree2fe32a2deab9e4fce4a4b81699af6fc1f308c56a
parent4b6fafefbee96559daba0801173acdcf364d0fbc
[JSC] Add [ConstructorParameters=] to all custom constructors
https://bugs.webkit.org/show_bug.cgi?id=78221

Reviewed by Adam Barth.

Source/WebCore:

This patch adds [ConstructorParameters=X] to IDL files that have
custom constructors, where X is the maximum number of arguments
of the constructor. [ConstructorParameters=X] is needed for custom
constructors, because custom constructors do not have a signature
in IDL files and thus CodeGeneratorJS.pm cannot know the number of
constructor arguments.

Test: fast/js/constructor-length.html

* dom/WebKitMutationObserver.idl:
* html/DOMFormData.idl:
* html/canvas/ArrayBuffer.idl:
* html/canvas/DataView.idl:
* html/canvas/Float32Array.idl:
* html/canvas/Float64Array.idl:
* html/canvas/Int16Array.idl:
* html/canvas/Int32Array.idl:
* html/canvas/Int8Array.idl:
* html/canvas/Uint16Array.idl:
* html/canvas/Uint32Array.idl:
* html/canvas/Uint8Array.idl:
* html/canvas/Uint8ClampedArray.idl:
* webaudio/AudioContext.idl:

* bindings/scripts/test/TestTypedArray.idl:

* bindings/scripts/test/JS/JSFloat64Array.cpp: Updated run-bindings-tests results.
(WebCore::JSFloat64ArrayConstructor::finishCreation):

LayoutTests:

The added tests check the length property of the custom constructors.

* fast/js/constructor-length.html:
* platform/mac/fast/js/constructor-length-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@109035 268f45cc-cd09-0410-ab3c-d52691b4dbfc
20 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/js/constructor-length.html
LayoutTests/platform/mac/fast/js/constructor-length-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/bindings/scripts/test/JS/JSFloat64Array.cpp
Source/WebCore/bindings/scripts/test/TestTypedArray.idl
Source/WebCore/dom/WebKitMutationObserver.idl
Source/WebCore/html/DOMFormData.idl
Source/WebCore/html/canvas/ArrayBuffer.idl
Source/WebCore/html/canvas/DataView.idl
Source/WebCore/html/canvas/Float32Array.idl
Source/WebCore/html/canvas/Float64Array.idl
Source/WebCore/html/canvas/Int16Array.idl
Source/WebCore/html/canvas/Int32Array.idl
Source/WebCore/html/canvas/Int8Array.idl
Source/WebCore/html/canvas/Uint16Array.idl
Source/WebCore/html/canvas/Uint32Array.idl
Source/WebCore/html/canvas/Uint8Array.idl
Source/WebCore/html/canvas/Uint8ClampedArray.idl
Source/WebCore/webaudio/AudioContext.idl