[webkit-reviews] review granted: [Bug 72392] [Qt] [WK2] Crash in Connection::readyReadHandler() on socket error : [Attachment 115188] Move connectionDidClose() out of scope of socketNotifierEnabler.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Nov 16 01:51:36 PST 2011


Simon Hausmann <hausmann at webkit.org> has granted Viatcheslav Ostapenko
<ostapenko.viatcheslav at nokia.com>'s request for review:
Bug 72392: [Qt] [WK2] Crash in Connection::readyReadHandler() on socket error
https://bugs.webkit.org/show_bug.cgi?id=72392

Attachment 115188: Move connectionDidClose() out of scope of
socketNotifierEnabler.
https://bugs.webkit.org/attachment.cgi?id=115188&action=review

------- Additional Comments from Simon Hausmann <hausmann at webkit.org>
I'll say r+ because this fixes a real bug. But I would actually prefer a
different solution to the problem:

Instead of working around the fact that SocketNotifierResourceGuard would
contain a dangling pointer by changing the scoping, I'd rather see a change
that make SocketNotifierResourceGuard robust against this problem, by changing
the QSocketNotifier pointer to be a QWeakPointer and checking it in the
destructor.

It's easy to introduce these kind of problems, and a more robust guard class
makes it harder to do so.

What do you think?


More information about the webkit-reviews mailing list