mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-14 05:45:37 +00:00
Bug 485579. Fix possible crash when closing tabs using cairo-qt. r=vlad, a=beltzner
This commit is contained in:
parent
080b6bec9f
commit
ec1bc87655
@ -10,6 +10,12 @@ MozQWidget::MozQWidget(nsWindow *receiver, QWidget *parent,
|
||||
setAttribute(Qt::WA_QuitOnClose, false);
|
||||
}
|
||||
|
||||
MozQWidget::~MozQWidget()
|
||||
{
|
||||
if (mReceiver)
|
||||
mReceiver->QWidgetDestroyed();
|
||||
}
|
||||
|
||||
bool MozQWidget::event(QEvent *e)
|
||||
{
|
||||
nsEventStatus status = nsEventStatus_eIgnore;
|
||||
|
@ -14,6 +14,8 @@ public:
|
||||
MozQWidget(nsWindow* receiver, QWidget *parent,
|
||||
const char *name, int f);
|
||||
|
||||
~MozQWidget();
|
||||
|
||||
/**
|
||||
* Mozilla helper.
|
||||
*/
|
||||
|
@ -109,6 +109,8 @@
|
||||
#include "qx11info_x11.h"
|
||||
#endif
|
||||
|
||||
#include <QtCore/QDebug>
|
||||
|
||||
#include <execinfo.h>
|
||||
|
||||
#include "mozqwidget.h"
|
||||
@ -316,6 +318,7 @@ nsWindow::Destroy(void)
|
||||
mMozQWidget->deleteLater();
|
||||
}
|
||||
|
||||
mMozQWidget = nsnull;
|
||||
mDrawingArea = nsnull;
|
||||
|
||||
OnDestroy();
|
||||
@ -1968,6 +1971,12 @@ nsWindow::ConvertBorderStyles(nsBorderStyle aStyle)
|
||||
return w;
|
||||
}
|
||||
|
||||
void nsWindow::QWidgetDestroyed()
|
||||
{
|
||||
mDrawingArea = nsnull;
|
||||
mMozQWidget = nsnull;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsWindow::MakeFullScreen(PRBool aFullScreen)
|
||||
{
|
||||
|
@ -208,6 +208,8 @@ public:
|
||||
void LoseFocus();
|
||||
qint32 ConvertBorderStyles(nsBorderStyle aStyle);
|
||||
|
||||
void QWidgetDestroyed();
|
||||
|
||||
|
||||
/***** from CommonWidget *****/
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user