Bug 790234 - [10.6] crash in libunwind::UnwindCursor - add some Objective-C try/catch exception blocks. r+a=Standard8
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Tue, 02 Oct 2012 15:39:52 +0100
changeset 13039 37cc1b60c8cecd58692d519793d66f3e89e6af3b
parent 13038 b97e88007ad46f4fa7ada42e6780362911e90d44
child 13040 b895521f908135cdd33980052b2acce897d98638
child 13042 54c7a1caa3b9c4d6a8ecc9748c23bd5b44ada491
push idunknown
push userunknown
push dateunknown
bugs790234
Bug 790234 - [10.6] crash in libunwind::UnwindCursor - add some Objective-C try/catch exception blocks. r+a=Standard8
mailnews/base/src/nsMessengerOSXIntegration.mm
--- a/mailnews/base/src/nsMessengerOSXIntegration.mm
+++ b/mailnews/base/src/nsMessengerOSXIntegration.mm
@@ -520,25 +520,31 @@ nsMessengerOSXIntegration::BounceDockIco
     }
   }
   return NS_OK;
 }
 
 nsresult
 nsMessengerOSXIntegration::RestoreDockIcon()
 {
+  NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT;
+
   id tile = [[NSApplication sharedApplication] dockTile];
   [tile setBadgeLabel: nil];
 
   return NS_OK;
+
+  NS_OBJC_END_TRY_ABORT_BLOCK_NSRESULT;
 }
 
 nsresult
 nsMessengerOSXIntegration::BadgeDockIcon()
 {
+  NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT;
+
   PRInt32 unreadCount = mUnreadTotal + mUnreadChat;
   // If count is less than one, we should restore the original dock icon.
   if (unreadCount < 1)
   {
     RestoreDockIcon();
     return NS_OK;
   }
 
@@ -574,16 +580,18 @@ nsMessengerOSXIntegration::BadgeDockIcon
   {
     RestoreDockIcon();
     return NS_OK;
   }
 
   id tile = [[NSApplication sharedApplication] dockTile];
   [tile setBadgeLabel:[NSString stringWithFormat:@"%S", total.get()]];
   return NS_OK;
+
+  NS_OBJC_END_TRY_ABORT_BLOCK_NSRESULT;
 }
 
 NS_IMETHODIMP
 nsMessengerOSXIntegration::OnItemPropertyFlagChanged(nsIMsgDBHdr *item, nsIAtom *property, PRUint32 oldFlag, PRUint32 newFlag)
 {
   return NS_OK;
 }