diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2009-10-17 12:21:22 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2009-10-17 12:21:22 -0400 |
commit | 27cadfbe951abb2cf350d5a1c91876ac958d50cf (patch) | |
tree | 117ebf82fcd26552e0437189bec2d063dd59e1de /indra/newview/llappviewer.cpp | |
parent | 2849175a302f26be03b5da404ef93363d42ed313 (diff) |
DEV-40930: Introduce LLAppViewerListener "forceQuit" operation.
The bug was driven by the following sequence in llstartup.cpp:
if(reason_response == "update"
|| reason_response == "optional")
{
// used to resend status event still containing "update",
// erroneously instantiating a second forced-update
// LLAlertDialog
LLLoginInstance::getInstance()->disconnect();
// quit with an LLAlertDialog still on sModalStack used
// to result in LL_ERRS
LLAppViewer::instance()->forceQuit();
}
I hope to be able to introduce a test script to verify the fix. That
script would need to be able to call LLAppViewer::forceQuit() rather than
requestQuit(), which is already available via LLAppViewerListener.
At the same time, changed LLAppViewerListener to bind a functor to
retrieve an LLAppViewer instance (namely LLAppViewer::instance) rather
than an LLAppViewer*. Apparently the static instantiation of
LLAppViewerListener was calling LLAppViewer::instance() too early, before
things were ready, so the declaration was changed to pass NULL -- then
in each method, call LLAppViewer::instance() if the bound pointer is NULL.
Binding the LLAppViewer* is a Feathers tactic intended to avoid the need
to reference the singleton. Binding a functor still leaves it up to the
instantiating code to reference LLAppViewer::instance, while deferring
the actual call to that method.
Diffstat (limited to 'indra/newview/llappviewer.cpp')
-rw-r--r-- | indra/newview/llappviewer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index a631314d5b..80749295ff 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -204,7 +204,7 @@ #pragma warning (disable:4702) #endif -static LLAppViewerListener sAppViewerListener("LLAppViewer", NULL); +static LLAppViewerListener sAppViewerListener("LLAppViewer", LLAppViewer::instance); ////// Windows-specific includes to the bottom - nasty defines in these pollute the preprocessor // |