[XProto] Fix regression in hiding switch/list expressions
In [1], I replaced: field.for_list = getattr(field, 'for_list', None) field.for_switch = getattr(field, 'for_switch', None) with: field.for_list = None field.for_switch = None However, getattr() is still necessary because these variables may be set when processing later fields from the same structure, so we need to know if they've already been set. This is compounded by the fields getting thrown into a dictionary, so when we're iterating over the keys, we get them in an unspecified order. [1] cd1129d8 BUG=1066670 R=msisov Change-Id: I84a9128b0b0403f543cbe905d37ebd4151cc0521 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2250510Reviewed-by:Maksim Sisov <msisov@igalia.com> Commit-Queue: Thomas Anderson <thomasanderson@chromium.org> Cr-Commit-Position: refs/heads/master@{#779908}
Showing
Please register or sign in to comment