Files
odfstudio/basic/qa/basic_coverage
Mike Kaganski b038106e8d tdf#166972: do not reset parameters in SbUnoObject::Notify
Resetting parameters in this function was introduced in commit
0b21b8b146 (initial commit for vba blob
( not including container_control stuff ), 2010-10-06). Unfortunately,
the reason for that is not explained.

The problem that it creates is that this code gets called eventually
from SbiRuntime::FindElement (which sets parameters using SetupArgs,
then calls SbiRuntime::CheckArray in the end, which calls GetObject,
which performs actual data access).

In SbiRuntime::CheckArray, the immediate problem was, that parameters
were referenced using a raw pointer; when the parageters were cleared
in GetObject, the pointer got dangling.

But it wasn't enough to use e.g. SbxArrayRef there, to keep the array
alive; the object will be accessed later, and needs its parameters to
work. On the other hand, it feels wrong to reinstate parameters after
the call to GetObject in SbiRuntime::CheckArray (getting the object
can run just any code path). So I chose to try and drop the resetting
of parameters in SbUnoObject::Notify. Let's see, if something breaks.

Change-Id: Icadfcfb8b7e5e87b2de46166963fd97532f8713c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186432
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2025-06-12 21:55:17 +02:00
..