Bug 23731 - Add JSCCustom and V8Custom as extended IDL attributes
Summary: Add JSCCustom and V8Custom as extended IDL attributes
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore JavaScript (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Darin Fisher (:fishd, Google)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-04 09:38 PST by Darin Fisher (:fishd, Google)
Modified: 2009-02-04 10:11 PST (History)
0 users

See Also:


Attachments
v1 patch (12.58 KB, patch)
2009-02-04 09:40 PST, Darin Fisher (:fishd, Google)
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Fisher (:fishd, Google) 2009-02-04 09:38:11 PST
Add JSCCustom and V8Custom as extended IDL attributes

This will help avoid having to add #ifdefs to the IDL files to support the V8 bindings.
Comment 1 Darin Fisher (:fishd, Google) 2009-02-04 09:40:51 PST
Created attachment 27316 [details]
v1 patch

In this patch, I define JSCCustom and make use of it in a few IDL files.  I also modify Document.idl to make use of V8Custom, which is known only to the CodeGeneratorV8.pm module (that has yet to be upstreamed).

I did not add JSCCustomGetter or JSCCustomSetter since they are not needed.  I could add those for completeness, but it seemed better to just focus on what is actually needed.
Comment 2 Darin Adler 2009-02-04 09:48:21 PST
Comment on attachment 27316 [details]
v1 patch

>              $numCustomAttributes++ if $attribute->signature->extendedAttributes->{"Custom"};
>              $numCustomAttributes++ if $attribute->signature->extendedAttributes->{"CustomGetter"};
>              $numCustomAttributes++ if $attribute->signature->extendedAttributes->{"CustomSetter"};
> +            $numCustomAttributes++ if $attribute->signature->extendedAttributes->{"JSCCustom"};

This will do the wrong thing if someone includes both "Custom" and "JSCustom" for the same attribute; and it won't report an error. It would be better to use || instead or consider it an error.

>          $numCustomFunctions++ if $function->signature->extendedAttributes->{"Custom"};
> +        $numCustomFunctions++ if $function->signature->extendedAttributes->{"JSCCustom"};

Same comment.

r=me
Comment 3 Darin Fisher (:fishd, Google) 2009-02-04 10:09:25 PST
Good catch.  Thanks!
Comment 4 Darin Fisher (:fishd, Google) 2009-02-04 10:11:31 PST
http://trac.webkit.org/changeset/40617