[WebKit2] Wake up threads blocked in waitForAndDispatchImmediately() if we lose our connection
Created attachment 231591 [details] [WebKit2] Wake up threads blocked in waitForAndDispatchImmediately() if we lose our connection
Comment on attachment 231591 [details] [WebKit2] Wake up threads blocked in waitForAndDispatchImmediately() if we lose our connection View in context: https://bugs.webkit.org/attachment.cgi?id=231591&action=review r=me > Source/WebKit2/ChangeLog:27 > +2014-05-16 Andy Estes <aestes@apple.com> > + > + Need a short description (OOPS!). > + Need the bug URL (OOPS!). > + > + Reviewed by NOBODY (OOPS!). > + > + * Platform/IPC/Connection.cpp: > + (IPC::Connection::Connection): > + (IPC::Connection::waitForMessage): > + (IPC::Connection::connectionDidClose): > + * Platform/IPC/Connection.h: ChangeLog conflict-o. > Source/WebKit2/Platform/IPC/Connection.cpp:682 > + m_waitForMessageCondition.notify_all(); > + } It is an optimization to drop the lock *before* calling notify_all(). Otherwise, you will wake a thread and it will promptly sleep again due to failing to acquire the locked mutex. Please move the call to notify_all() out of the lock scope.
Committed r169051: <http://trac.webkit.org/changeset/169051>