Changeset 208657 in webkit
- Timestamp:
- Nov 12, 2016 2:24:33 PM (7 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r208633 r208657 1 2016-11-12 Brian Burg <bburg@apple.com> 2 3 Web Automation: terminate the automation session if the web process crashes 4 https://bugs.webkit.org/show_bug.cgi?id=164671 5 <rdar://problem/29028964> 6 7 Reviewed by Joseph Pecoraro. 8 9 * UIProcess/Automation/WebAutomationSession.h: 10 * UIProcess/Automation/WebAutomationSession.cpp: 11 (WebKit::WebAutomationSession::disconnect): 12 (WebKit::WebAutomationSession::terminate): 13 Factor out code that disconnects the remote, unpairs, and notifies the client. 14 Then, expose terminate() which can be called without a FrontendChannel. 15 Calling this causes the _WKAutomationDelegate to clear the local-side session in the 16 browser, and disconnecting from the remote will hang up the remote-side session. 17 18 * UIProcess/WebPageProxy.cpp: 19 (WebKit::WebPageProxy::processDidCrash): 20 Terminate the session. 21 1 22 2016-11-11 Alex Christensen <achristensen@webkit.org> 2 23 -
trunk/Source/WebKit2/UIProcess/Automation/WebAutomationSession.cpp
r203635 r208657 130 130 { 131 131 ASSERT(channel == m_remoteChannel); 132 133 m_remoteChannel = nullptr; 134 m_frontendRouter->disconnectFrontend(channel); 132 terminate(); 133 } 134 135 #endif // ENABLE(REMOTE_INSPECTOR) 136 137 void WebAutomationSession::terminate() 138 { 139 #if ENABLE(REMOTE_INSPECTOR) 140 if (Inspector::FrontendChannel* channel = m_remoteChannel) { 141 m_remoteChannel = nullptr; 142 m_frontendRouter->disconnectFrontend(channel); 143 } 135 144 136 145 setIsPaired(false); 146 #endif 137 147 138 148 if (m_client) 139 149 m_client->didDisconnectFromRemote(this); 140 150 } 141 142 #endif // ENABLE(REMOTE_INSPECTOR)143 151 144 152 WebPageProxy* WebAutomationSession::webPageProxyForHandle(const String& handle) -
trunk/Source/WebKit2/UIProcess/Automation/WebAutomationSession.h
r204668 r208657 94 94 void disconnect(Inspector::FrontendChannel*) override; 95 95 #endif 96 void terminate(); 96 97 97 98 // Inspector::AutomationBackendDispatcherHandler API -
trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp
r208406 r208657 5288 5288 else 5289 5289 m_loaderClient->processDidCrash(*this); 5290 5291 if (m_controlledByAutomation) { 5292 if (auto* automationSession = process().processPool().automationSession()) 5293 automationSession->terminate(); 5294 } 5290 5295 } 5291 5296
Note: See TracChangeset
for help on using the changeset viewer.