зеркало из https://github.com/mozilla/pjs.git
Fix bug 96232, crash while typing if tooltip is showing. Add kung fu death grip on the nsMacWindow. r=pinkerton/brade, sr=brendan, a=drivers
This commit is contained in:
Родитель
2ef6412172
Коммит
9a6041c61f
|
@ -38,7 +38,8 @@ NS_EXPORT PRBool nsMacMessageSink::DispatchOSEvent(
|
||||||
PRBool eventHandled = PR_FALSE;
|
PRBool eventHandled = PR_FALSE;
|
||||||
|
|
||||||
nsMacWindow* raptorWindow = GetNSWindowFromMacWindow(aWindow);
|
nsMacWindow* raptorWindow = GetNSWindowFromMacWindow(aWindow);
|
||||||
|
// prevent the window being deleted while we're in its methods
|
||||||
|
nsCOMPtr<nsIWidget> kungFuDeathGrip(NS_STATIC_CAST(nsIWidget*, raptorWindow));
|
||||||
if (raptorWindow)
|
if (raptorWindow)
|
||||||
{
|
{
|
||||||
eventHandled = raptorWindow->HandleOSEvent(anEvent);
|
eventHandled = raptorWindow->HandleOSEvent(anEvent);
|
||||||
|
@ -61,6 +62,8 @@ NS_EXPORT PRBool nsMacMessageSink::DispatchMenuCommand(
|
||||||
PRBool eventHandled = PR_FALSE;
|
PRBool eventHandled = PR_FALSE;
|
||||||
|
|
||||||
nsMacWindow* raptorWindow = GetNSWindowFromMacWindow(aWindow);
|
nsMacWindow* raptorWindow = GetNSWindowFromMacWindow(aWindow);
|
||||||
|
// prevent the window being deleted while we're in its methods
|
||||||
|
nsCOMPtr<nsIWidget> kungFuDeathGrip(NS_STATIC_CAST(nsIWidget*, raptorWindow));
|
||||||
if (raptorWindow)
|
if (raptorWindow)
|
||||||
{
|
{
|
||||||
eventHandled = raptorWindow->HandleMenuCommand(anEvent, menuResult);
|
eventHandled = raptorWindow->HandleMenuCommand(anEvent, menuResult);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче