[Webkit-unassigned] [Bug 72392] [Qt] [WK2] Crash in Connection::readyReadHandler() on socket error
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Nov 16 02:38:06 PST 2011
https://bugs.webkit.org/show_bug.cgi?id=72392
--- Comment #3 from Simon Hausmann <hausmann at webkit.org> 2011-11-16 02:38:06 PST ---
This is what I have in mind:
diff --git a/Source/WebKit2/Platform/CoreIPC/unix/ConnectionUnix.cpp b/Source/WebKit2/Platform/CoreIPC/unix/ConnectionUnix.cpp
index 5a61ed6..29acf6c 100644
--- a/Source/WebKit2/Platform/CoreIPC/unix/ConnectionUnix.cpp
+++ b/Source/WebKit2/Platform/CoreIPC/unix/ConnectionUnix.cpp
@@ -40,6 +40,7 @@
#if PLATFORM(QT)
#include <QSocketNotifier>
+#include <QWeakPointer>
#elif PLATFORM(GTK)
#include <glib.h>
#endif
@@ -162,16 +163,17 @@ public:
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
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list