diff options
Diffstat (limited to 'indra/newview/llscreenchannel.cpp')
-rwxr-xr-x | indra/newview/llscreenchannel.cpp | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp index 168a941ec3..8708fb87ee 100755 --- a/indra/newview/llscreenchannel.cpp +++ b/indra/newview/llscreenchannel.cpp @@ -49,10 +49,10 @@ using namespace LLNotificationsUI; bool LLScreenChannel::mWasStartUpToastShown = false; -LLFastTimer::DeclareTimer FTM_GET_CHANNEL_RECT("Calculate Notification Channel Region"); +LLTrace::BlockTimerStatHandle FTM_GET_CHANNEL_RECT("Calculate Notification Channel Region"); LLRect LLScreenChannelBase::getChannelRect() { - LLFastTimer _(FTM_GET_CHANNEL_RECT); + LL_RECORD_BLOCK_TIME(FTM_GET_CHANNEL_RECT); if (mFloaterSnapRegion == NULL) { @@ -273,6 +273,14 @@ void LLScreenChannel::addToast(const LLToast::Params& p) // only cancel notification if it isn't being used in IM session LLNotifications::instance().cancel(notification); } + + // It was assumed that the toast would take ownership of the panel pointer. + // But since we have decided not to display the toast, kill the panel to + // prevent the memory leak. + if (p.panel != NULL) + { + p.panel()->die(); + } return; } @@ -599,7 +607,7 @@ void LLScreenChannel::showToastsBottom() LLToast* toast = (it-1)->getToast(); if (!toast) { - llwarns << "Attempt to display a deleted toast." << llendl; + LL_WARNS() << "Attempt to display a deleted toast." << LL_ENDL; return; } @@ -610,7 +618,7 @@ void LLScreenChannel::showToastsBottom() LLToast* toast = it->getToast(); if(!toast) { - llwarns << "Attempt to display a deleted toast." << llendl; + LL_WARNS() << "Attempt to display a deleted toast." << LL_ENDL; return; } @@ -698,7 +706,7 @@ void LLScreenChannel::showToastsCentre() LLToast* toast = mToastList[0].getToast(); if (!toast) { - llwarns << "Attempt to display a deleted toast." << llendl; + LL_WARNS() << "Attempt to display a deleted toast." << LL_ENDL; return; } @@ -711,7 +719,7 @@ void LLScreenChannel::showToastsCentre() LLToast* toast = it->getToast(); if (!toast) { - llwarns << "Attempt to display a deleted toast." << llendl; + LL_WARNS() << "Attempt to display a deleted toast." << LL_ENDL; return; } @@ -747,7 +755,7 @@ void LLScreenChannel::showToastsTop() LLToast* toast = (it-1)->getToast(); if (!toast) { - llwarns << "Attempt to display a deleted toast." << llendl; + LL_WARNS() << "Attempt to display a deleted toast." << LL_ENDL; return; } @@ -758,7 +766,7 @@ void LLScreenChannel::showToastsTop() LLToast* toast = it->getToast(); if (!toast) { - llwarns << "Attempt to display a deleted toast." << llendl; + LL_WARNS() << "Attempt to display a deleted toast." << LL_ENDL; return; } @@ -954,7 +962,7 @@ void LLScreenChannel::hideToastsFromScreen() } else { - llwarns << "Attempt to hide a deleted toast." << llendl; + LL_WARNS() << "Attempt to hide a deleted toast." << LL_ENDL; } } } @@ -972,7 +980,7 @@ void LLScreenChannel::hideToast(const LLUUID& notification_id) } else { - llwarns << "Attempt to hide a deleted toast." << llendl; + LL_WARNS() << "Attempt to hide a deleted toast." << LL_ENDL; } } } |