https://bugs.webkit.org/show_bug.cgi?id=72392
Patch by Viatcheslav Ostapenko <ostapenko.viatcheslav@nokia.com> on 2011-11-16
Reviewed by Simon Hausmann.
Add QWeakPointer to SocketNotifierResourceGuard::m_socketNotifier to track
deallocation of referenced object.
* Platform/CoreIPC/unix/ConnectionUnix.cpp:
(CoreIPC::SocketNotifierResourceGuard::SocketNotifierResourceGuard):
(CoreIPC::SocketNotifierResourceGuard::~SocketNotifierResourceGuard):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@100455
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2011-11-16 Viatcheslav Ostapenko <ostapenko.viatcheslav@nokia.com>
+
+ [Qt] [WK2] Crash in Connection::readyReadHandler() on socket error
+ https://bugs.webkit.org/show_bug.cgi?id=72392
+
+ Reviewed by Simon Hausmann.
+
+ Add QWeakPointer to SocketNotifierResourceGuard::m_socketNotifier to track
+ deallocation of referenced object.
+
+ * Platform/CoreIPC/unix/ConnectionUnix.cpp:
+ (CoreIPC::SocketNotifierResourceGuard::SocketNotifierResourceGuard):
+ (CoreIPC::SocketNotifierResourceGuard::~SocketNotifierResourceGuard):
+
2011-11-16 Zeno Albisser <zeno@webkit.org>
[Qt][WK2][Mac] MiniBrowser cannot create socketpair.
#if PLATFORM(QT)
#include <QSocketNotifier>
+#include <QWeakPointer>
#elif PLATFORM(GTK)
#include <glib.h>
#endif
SocketNotifierResourceGuard(QSocketNotifier* socketNotifier)
: m_socketNotifier(socketNotifier)
{
- m_socketNotifier->setEnabled(false);
+ m_socketNotifier.data()->setEnabled(false);
}
~SocketNotifierResourceGuard()
{
- m_socketNotifier->setEnabled(true);
+ if (m_socketNotifier)
+ m_socketNotifier.data()->setEnabled(true);
}
private:
- QSocketNotifier* const m_socketNotifier;
+ QWeakPointer<QSocketNotifier> const m_socketNotifier;
};
#endif