summaryrefslogtreecommitdiff
path: root/indra/llcommon/llerror.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2022-06-21 15:23:29 -0400
committerNat Goodspeed <nat@lindenlab.com>2022-06-21 15:23:29 -0400
commitfdc0257acbde5a2d5bb201efcc8bb723df09daf8 (patch)
treee2ad75447d0f54777814744a00b3234a5c5a1d43 /indra/llcommon/llerror.cpp
parent490de3ab6e3a2b9dd8668c2093e265f36324f82e (diff)
DRTVWR-564: Fix LLEventDispatcher::addMethod() for LazyEventAPI.
A classic LLEventAPI subclass calls LLEventDispatcher::add() methods in its own constructor. At that point, addMethod() can reliably dynamic_cast its 'this' pointer to the new subclass. But because of the way LazyEventAPI queues up add() calls, they're invoked in the (new) LLEventAPI constructor itself. The subclass constructor body hasn't even started running, and LLEventDispatcher::addMethod()'s dynamic_cast to the LLEventAPI subclass returns nullptr. addMethod() claims the new subclass isn't derived from LLEventDispatcher, which is confusing since it is. It works to change addMethod()'s dynamic_cast to static_cast. Flesh out lazyeventapi_test.cpp. post() maps with "op" keys to actually try to engage the registered operation. Give the operation an observable side effect; use ensure_mumble() to verify. Also verify that LazyEventAPI has captured the subject LLEventAPI's metadata in a way we can retrieve.
Diffstat (limited to 'indra/llcommon/llerror.cpp')
0 files changed, 0 insertions, 0 deletions