[Webkit-unassigned] [Bug 155745] REGRESSION(r198792): [GTK] Inspector crashes in Inspector::Protocol::getEnumConstantValue since r198792

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Apr 1 07:36:43 PDT 2016


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

Brian Burg <bburg at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #275268|review?                     |review+, commit-queue-
              Flags|                            |

--- Comment #19 from Brian Burg <bburg at apple.com> ---
Comment on attachment 275268
  --> https://bugs.webkit.org/attachment.cgi?id=275268
Rebased patch to fix the build

View in context: https://bugs.webkit.org/attachment.cgi?id=275268&action=review

r=me

Just some style issues remain. Please post an updated patch so we can set cq+ on it.

> Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_protocol_types_header.py:173
> +        return ['\n\n'.join(lines)]

The pattern used in these generators is that lines are joined by one newline, and sections are joined by two newlines. So you could just return the array here and the caller will join it the same way.

> Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_protocol_types_header.py:412
> +        sections.insert(0, '\n'.join([

Why do we need to use insert here? The generator's sections should be in the same order as the generated sections.

> Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_protocol_types_implementation.py:154
> +        sections.insert(0, 'namespace %s {' % self.helpers_namespace())

Instead of using insert and causing the generator and generated file to have different line order, please use a guard at the top like 'if not self.assigned_enum_values()' and return [] before generating sections.

> Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_protocol_types_implementation.py:156
> +        return ['\n\n'.join(sections)]

See above comment, should not be necessary to join sections here if the caller can extend with this method's result.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160401/17fc581e/attachment.html>


More information about the webkit-unassigned mailing list