Bug 164671

Summary: Web Automation: terminate the automation session if the web process crashes
Product: WebKit Reporter: BJ Burg <bburg>
Component: WebKit2Assignee: BJ Burg <bburg>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, bburg, commit-queue, ggaren, joepeck, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Proposed Fix
none
For EWS
none
For EWS none

Description BJ Burg 2016-11-11 18:59:02 PST
,
Comment 1 BJ Burg 2016-11-11 18:59:08 PST
<rdar://problem/29028964>
Comment 2 BJ Burg 2016-11-11 19:13:36 PST
Created attachment 294581 [details]
Proposed Fix
Comment 3 WebKit Commit Bot 2016-11-11 19:14:46 PST
Attachment 294581 [details] did not pass style-queue:


ERROR: Source/WebKit2/UIProcess/WebPageProxy.cpp:5291:  Multi line control clauses should use braces.  [whitespace/braces] [4]
Total errors found: 1 in 4 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Joseph Pecoraro 2016-11-11 19:20:34 PST
Comment on attachment 294581 [details]
Proposed Fix

View in context: https://bugs.webkit.org/attachment.cgi?id=294581&action=review

> Source/WebKit2/UIProcess/Automation/WebAutomationSession.cpp:143
> +    Inspector::FrontendChannel* channel = nullptr;
> +    std::swap(channel, m_remoteChannel);
> +    if (channel)
> +        m_frontendRouter->disconnectFrontend(channel);

This swap seems overkill. I'd rather make it easy to search for "m_remoteChannel =". Perhaps:

    if (Inspector::FrontendChannel* channel = m_remoteChannel) {
        m_remoteChannel = nullptr;
        m_frontendRouter->disconnectFrontend(channel);
    }

> Source/WebKit2/UIProcess/WebPageProxy.cpp:5291
> +    if (m_controlledByAutomation)

Style: Braces
Comment 5 BJ Burg 2016-11-11 20:32:45 PST
Created attachment 294588 [details]
For EWS
Comment 6 WebKit Commit Bot 2016-11-11 20:33:43 PST
Attachment 294588 [details] did not pass style-queue:


ERROR: Source/WebKit2/UIProcess/WebPageProxy.cpp:5291:  Multi line control clauses should use braces.  [whitespace/braces] [4]
Total errors found: 1 in 4 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 7 Joseph Pecoraro 2016-11-11 20:59:04 PST
Comment on attachment 294588 [details]
For EWS

View in context: https://bugs.webkit.org/attachment.cgi?id=294588&action=review

> Source/WebKit2/UIProcess/WebPageProxy.cpp:5291
> +    if (m_controlledByAutomation)

Style still.
Comment 8 BJ Burg 2016-11-12 12:29:47 PST
Created attachment 294626 [details]
For EWS
Comment 9 WebKit Commit Bot 2016-11-12 14:27:40 PST
Comment on attachment 294626 [details]
For EWS

Clearing flags on attachment: 294626

Committed r208657: <http://trac.webkit.org/changeset/208657>
Comment 10 WebKit Commit Bot 2016-11-12 14:27:44 PST
All reviewed patches have been landed.  Closing bug.