Bug 133010

Summary: [WebKit2] Wake up threads blocked in waitForAndDispatchImmediately() if we lose our connection
Product: WebKit Reporter: Andy Estes <aestes>
Component: New BugsAssignee: Andy Estes <aestes>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
[WebKit2] Wake up threads blocked in waitForAndDispatchImmediately() if we lose our connection ggaren: review+

Andy Estes
Reported 2014-05-16 14:33:26 PDT
[WebKit2] Wake up threads blocked in waitForAndDispatchImmediately() if we lose our connection
Attachments
[WebKit2] Wake up threads blocked in waitForAndDispatchImmediately() if we lose our connection (4.08 KB, patch)
2014-05-16 14:36 PDT, Andy Estes
ggaren: review+
Andy Estes
Comment 1 2014-05-16 14:36:16 PDT
Created attachment 231591 [details] [WebKit2] Wake up threads blocked in waitForAndDispatchImmediately() if we lose our connection
Geoffrey Garen
Comment 2 2014-05-16 14:47:27 PDT
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.
Andy Estes
Comment 3 2014-05-19 11:00:54 PDT
Note You need to log in before you can comment on or make changes to this bug.