Properly handle initial object queryInterface return value

Desktop / LibreOffice - Stephan Bergmann [redhat.com] - 4 June 2020 21:19 UTC

specifies that this shall return an ANY either of type VOID (so handle that) or of type css.uno.XInterface with non-null value (so throw exceptions for any other kinds of return values).

Various Linux Jenkins builds had recently started to sporadically fail during UITest_calc_demo, hitting the

assert( type.get()->eTypeClass == typelib_TypeClass_ANY || type.equals(css::uno::TypeDescription(data_.pType)));

in the call to binaryurp::BinaryAny::getValue (binaryurp/source/binaryany.cxx), e.g. <. While it is unclear why those failures happen, they highlight that this code did not properly handle all possible (valid or invalid) input.

Change-Id: I95db574aa102ff75fa22fd24c697a0cfa24b7aff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95527

56428bd9ad98 Properly handle initial object queryInterface return value
binaryurp/source/bridge.cxx | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)

Upstream: cgit.freedesktop.org


  • Share