Commit 12766831 authored by Samuel Huang's avatar Samuel Huang Committed by Commit Bot

[SuperSize] Fix breakage on Trichrome from |metadata| being None.

Previously, CreateMetadata() returns None if the resulting metadata is
empty. Recently updates to _ParseApkOtherSymbols() requires |metadata|
to be available (to add 'zipalign_padding') field. This leads to
breakage when SuperSize is run on Trichrome.

This CL changes CreateMetadata() to return {} instead of None to fix
the issue. This does not affect existing metadata use in SuperSize;
already it's not explicitly compared against None.

Bug: 1040645
Change-Id: I8664148f647910cbb5f9dea216684262174e0e03
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2427324Reviewed-by: default avatarAndrew Grieve <agrieve@chromium.org>
Commit-Queue: Samuel Huang <huangs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#810255}
parent e7304270
......@@ -852,7 +852,7 @@ def CreateMetadata(map_path, elf_path, apk_path, minimal_apks_path, tool_prefix,
key += '-' + name
metadata[key] = size
return metadata or None
return metadata
def _ResolveThinArchivePaths(raw_symbols, thin_archives):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment