mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 02:14:43 +00:00
Bug 1151349 - Make lldb ns(Int)Region summary handle the numRects==0 case. r=jrmuizel
--HG-- extra : rebase_source : dad2c2c5ef4c17fe1e296b31ee7f36a26254d1ff
This commit is contained in:
parent
9d5633949a
commit
78ec2f4d18
@ -110,13 +110,12 @@ def rect_is_empty(valobj):
|
||||
def summarize_region(valobj, internal_dict):
|
||||
# This function makes use of the synthetic children generated for ns(Int)Regions.
|
||||
bounds = valobj.GetChildMemberWithName("bounds")
|
||||
num_rects = valobj.GetChildMemberWithName("numRects").GetValueAsUnsigned(0)
|
||||
if num_rects == 0:
|
||||
return "empty"
|
||||
bounds_summary = summarize_rect(bounds, internal_dict)
|
||||
if num_rects == 1:
|
||||
num_rects = valobj.GetChildMemberWithName("numRects").GetValueAsUnsigned(0)
|
||||
if num_rects <= 1:
|
||||
if rect_is_empty(bounds):
|
||||
return "empty"
|
||||
if num_rects == 1:
|
||||
return "one rect: " + bounds_summary
|
||||
return str(num_rects) + " rects, bounds: " + bounds_summary
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user