зеркало из https://github.com/mozilla/pjs.git
Bug 485579. Fix possible crash when closing tabs using cairo-qt. r=vlad, a=beltzner
This commit is contained in:
Родитель
80ebb1c3f2
Коммит
5d80d0d31b
widget/src/qt
|
@ -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 *****/
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче