[Webkit-unassigned] [Bug 106553] [V8] Add IDL 'enum' support to CodeGeneratorV8.pm

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jan 29 18:11:45 PST 2013


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





--- Comment #24 from Adam Barth <abarth at webkit.org>  2013-01-29 18:13:44 PST ---
> No reason -- I'm not familiar with V8/WebCore conventions or classes;
> what should I do (well, you have a suggestion -- could you elaborate)?
> 
> A couple questions:
> 1. Should we avoid explicit conversions?
>   (Makes sense, just checking)
>   so: "String string = v" instead of "String string = String(v)" ?

Generally it's fine to use implicit conversions.  We declare many constructors "explicit", but for the ones that aren't marked "explicit", it's fine to use the implicit conversions.

> 2. Should we use const -- I'm just converting so I can compare,
>   and not modifying "string".
>   so: "const String string = v" instead of "String string = v" ?

Generally, we don't use "const" with String.  I don't think there's any harm in using const in this context, it's just not something we do typically.

> 3. How should I be comparing strings?
>   v is a V8StringResource I believe, which doesn't have a comparison,
>   so I'm casting it to String and comparing those, which works;
>   is it The Right Way to do it?

That's a good question.  Haraken might have some insight, but conversion to a String makes sense in this case because we'll need the String version in the common case anyway (i.e., when the comparisons pass).

> Oh, and pleasure to be working with you, Mr. Barth.

And you as well Mr. Barth.

-- 
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