Bug 1383816 - Fixes several minor errors in Variant's IPC implementation. r=botond

* VariantWriter construction switched to use aggregate initialization
* Call to AsVariant was inappropriately called via |paramType| when it should
  have been called via |mozilla|
* |Next::Read| call in VariantReader specialization was missing the |result|
  argument

MozReview-Commit-ID: Izany7iDX0k

--HG--
extra : rebase_source : 7387e72100c7d2ba8fcfd1e5a3b6d0ce6be6c740
This commit is contained in:
Jeff Hajewski 2017-09-03 06:30:42 -05:00
Родитель 2f8387c6cb
Коммит 4a5af78bc9
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -922,7 +922,7 @@ struct ParamTraits<mozilla::Variant<Ts...>>
static void Write(Message* msg, const paramType& param)
{
WriteParam(msg, param.tag);
param.match(VariantWriter(msg));
param.match(VariantWriter{msg});
}
// Because VariantReader is a nested struct, we need the dummy template
@ -945,12 +945,12 @@ struct ParamTraits<mozilla::Variant<Ts...>>
// actually interested in the N - 1 tag.
typename mozilla::detail::Nth<N - 1, Ts...>::Type val;
if (ReadParam(msg, iter, &val)) {
*result = paramType::AsVariant(val);
*result = mozilla::AsVariant(val);
return true;
}
return false;
} else {
return Next::Read(msg, iter, tag);
return Next::Read(msg, iter, tag, result);
}
}