Skip to content
  • haraken@chromium.org's avatar
    [JSC] Add [ConstructorParameters=] to all custom constructors · fb4d2b64
    haraken@chromium.org authored
    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: http://svn.webkit.org/repository/webkit/trunk@109035 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    fb4d2b64