[Webkit-unassigned] [Bug 84540] JS binding code generator doesn't handle "attribute unsigned long[]" well

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Apr 23 00:05:12 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=84540


Kentaro Hara <haraken at chromium.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #138297|review?                     |review-
               Flag|                            |




--- Comment #5 from Kentaro Hara <haraken at chromium.org>  2012-04-23 00:05:11 PST ---
(From update of attachment 138297)
View in context: https://bugs.webkit.org/attachment.cgi?id=138297&action=review

The approach looks good.

> Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:3028
> +        if ($arrayType ne "String" && $arrayType ne "unsigned long") {

We do not want to add '$arrayType ne ...' in both CodeGeneratorJS.pm and CodeGeneratorV8.pm every time we support sequence<some_primitive_type>. Shall we make it a common subroutine in CodeGenerator.pm?

sub IsPrimitiveType
{
    my $type = shift;
    return 1 if $type eq "String";
    return 1 if $type eq "unsigned long";
    ...;
    return 0;
}

> Source/WebCore/bindings/scripts/CodeGeneratorV8.pm:3805
> +        if ($arrayType ne "String" && $arrayType ne "unsigned long") {

Ditto.

> Source/WebCore/bindings/scripts/test/TestObj.idl:49
> +        readonly attribute sequence<unsigned long> unsignedLongSequenceAttr;

Let's add test cases for other primitive types, e.g. sequence<long>, sequence<float> etc.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list