Bug 1375231 - Properly compare value for --enable-webrender; r=glandium

"value" here is a PositiveOptionValue, which behaves like a tuple.
Its __eq__ fails if the types of the operands aren't the same. A
string literal isn't a PositiveOptionValue, so the "value == 'build'"
check always fails. This meant that --enable-webrender=build was
always being interpreted as --enable-webrender. Yikes.

MozReview-Commit-ID: 57hWl0VqDmD

--HG--
extra : rebase_source : 44b858a4bbf9002813a16ba29429696005901ccc
This commit is contained in:
Gregory Szorc 2017-06-21 13:04:04 -07:00
parent 220e6d47b6
commit 7c45840cbd

View File

@ -827,7 +827,7 @@ def webrender(value, milestone):
if value.origin == 'default':
# if nothing is specified, default to just building on Nightly
build_webrender = milestone.is_nightly
elif value == 'build':
elif len(value) and value[0] == 'build':
# if explicitly set to 'build', then we build but don't enable
build_webrender = True
elif bool(value):