[Webkit-unassigned] [Bug 77289] Web Inspector: CodeGeneratorInspector.py: reimplement generated array types

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 30 10:10:05 PST 2012


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





--- Comment #6 from Andrey Kosyakov <caseq at chromium.org>  2012-01-30 10:10:04 PST ---
(From update of attachment 124452)
View in context: https://bugs.webkit.org/attachment.cgi?id=124452&action=review

> Source/WebCore/inspector/CodeGeneratorInspector.py:1580
> +template<typename T>
> +class ArrayItemHelper {
> +public:
> +    typedef typename T::ItemTraits Traits;
> +};

Why not use T::ItemTraits directly?

> Source/WebCore/inspector/CodeGeneratorInspector.py:1583
> +class ArrayOf : public InspectorArray {

We don't normally use Of in container type names, e.g. it's map or vector, not mapOf or VectorOf.

> Source/WebCore/inspector/CodeGeneratorInspector.py:1609
> +class StructItemTraits {
> +public:

just struct?

> Source/WebCore/inspector/CodeGeneratorInspector.py:1610
> +    static void pushRefPtr(InspectorArray* array, PassRefPtr<InspectorObject> value)

why do we need to include type into method name, i.e. why not just push()?

> Source/WebCore/inspector/CodeGeneratorInspector.py:1618
> +    template<typename T>
> +    static void assertCorrectValue(InspectorValue* value) {
> +        T::assertCorrectValue(value);
> +    }

Why do we need this wrapper?

> Source/WebCore/inspector/CodeGeneratorInspector.py:1625
> +class ArrayItemHelper<String> {
> +public:
> +    class Traits {
> +    public:

just struct?

> Source/WebCore/inspector/CodeGeneratorInspector.py:1626
> +        static void pushRaw(InspectorArray* array, const String& value)

just push()?

> Source/WebCore/inspector/CodeGeneratorInspector.py:1637
> +class ArrayItemHelper<InspectorObject> {
> +public:
> +    class Traits {
> +    public:

ditto

> Source/WebCore/inspector/CodeGeneratorInspector.py:2115
> +        ArrayItemHelper<T>::Traits::template assertCorrectValue<T>(array->get(i).get());

Does this compile?

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