Changeset 196730 in webkit
- Timestamp:
- Feb 17, 2016 4:37:50 PM (8 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r196728 r196730 1 2016-02-17 Brian Burg <bburg@apple.com> 2 3 RemoteInspector deadlocks if _WKAutomationDelegate creates/registers a target synchronously 4 https://bugs.webkit.org/show_bug.cgi?id=154359 5 <rdar://problem/24708897> 6 7 Reviewed by Joseph Pecoraro. 8 9 RemoteInspector always grabs a lock whenever receiving or sending XPC messages. If it 10 forwards a new session request via _WKAutomationDelegate, and the client synchronously 11 creates and registers a session, then RemoteInspector will try to grab the lock again 12 while adding the session to its registry, causing a deadlock. 13 14 * UIProcess/Cocoa/AutomationClient.mm: 15 (WebKit::AutomationClient::requestAutomationSession): Add a dispatch_async() to 16 protect clients from accidentally deadlocking. They shouldn't have to care about 17 RemoteInspector's locking mechanisms. 18 1 19 2016-02-17 Anders Carlsson <andersca@apple.com> 2 20 -
trunk/Source/WebKit2/UIProcess/Cocoa/AutomationClient.mm
r196562 r196730 70 70 void AutomationClient::requestAutomationSession(const String& sessionIdentifier) 71 71 { 72 if (m_delegateMethods.requestAutomationSession) 73 [m_delegate.get() _processPool:m_processPool didRequestAutomationSessionWithIdentifier:sessionIdentifier]; 72 // Force clients to create and register a session asynchronously. Otherwise, 73 // RemoteInspector will try to acquire its lock to register the new session and 74 // deadlock because it's already taken while handling XPC messages. 75 dispatch_async(dispatch_get_main_queue(), ^{ 76 if (m_delegateMethods.requestAutomationSession) 77 [m_delegate.get() _processPool:m_processPool didRequestAutomationSessionWithIdentifier:sessionIdentifier]; 78 }); 74 79 } 75 80
Note: See TracChangeset
for help on using the changeset viewer.