Fix incorrect use of DCHECK in CommandDictionary::GetCommandsAsJson.
https://weave-review.googlesource.com/c/8458/ introduced a bug in the
CommandDictionary::GetCommandsAsJson, where the |package| variable isn't
updated in the release build due to the incorrect use of DHCECK.
BUG=chromium:691664
TEST=`USE=cros-debug FEATURES=test emerge-arkham libweave`
TEST=`USE=-cros-debug FEATURES=test emerge-arkham libweave`
Change-Id: Ia129019205714c74186b96982fd79cc8a25f9874
Reviewed-on: https://weave-review.googlesource.com/8651
Reviewed-by: Mike Frysinger <vapier@google.com>
diff --git a/src/commands/command_dictionary.cc b/src/commands/command_dictionary.cc
index 3d2354a..55735f2 100644
--- a/src/commands/command_dictionary.cc
+++ b/src/commands/command_dictionary.cc
@@ -215,7 +215,9 @@
// object for it.
dict->SetWithoutPathExpansion(package_name,
base::MakeUnique<base::DictionaryValue>());
- DCHECK(dict->GetDictionaryWithoutPathExpansion(package_name, &package));
+ bool got_package =
+ dict->GetDictionaryWithoutPathExpansion(package_name, &package);
+ DCHECK(got_package);
}
auto command_def = base::MakeUnique<base::DictionaryValue>();
command_def->Set(commands::attributes::kCommand_Parameters,