[Webkit-unassigned] [Bug 110159] Web Inspector: take large strings out of CodeGeneratorInspector.py

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Feb 19 02:06:58 PST 2013


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





--- Comment #3 from Ilya Tikhonovsky <loislo at chromium.org>  2013-02-19 02:09:20 PST ---
View in context: https://bugs.webkit.org/attachment.cgi?id=188951&action=review

What do you think about further splitting of this file. I'd expect to see one template file per one result file.

> Source/WebCore/inspector/CodeGeneratorInspectorStrings.py:701
> +#endif  // !ASSERT_DISABLED

Wrong comment here and in many other places like that.

> Source/WebCore/inspector/CodeGeneratorInspectorStrings.py:922
> +class_binding_builder_part_1 = (
> +"""        AllFieldsSet = %s
> +    };
> +
> +    template<int STATE>
> +    class Builder {
> +    private:
> +        RefPtr<InspectorObject> m_result;
> +
> +        template<int STEP> Builder<STATE | STEP>& castState()
> +        {
> +            return *reinterpret_cast<Builder<STATE | STEP>*>(this);
> +        }
> +
> +        Builder(PassRefPtr</*%s*/InspectorObject> ptr)
> +        {
> +            COMPILE_ASSERT(STATE == NoFieldsSet, builder_created_in_non_init_state);
> +            m_result = ptr;
> +        }
> +        friend class %s;
> +    public:
> +""")

I think that it would be more declarative and less error prone if you convert it to a function with named argument instead of a string.

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