Bug 164671 - Web Automation: terminate the automation session if the web process crashes
Summary: Web Automation: terminate the automation session if the web process crashes
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: BJ Burg
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2016-11-11 18:59 PST by BJ Burg
Modified: 2016-11-12 14:27 PST (History)
7 users (show)

See Also:


Attachments
Proposed Fix (4.02 KB, patch)
2016-11-11 19:13 PST, BJ Burg
no flags Details | Formatted Diff | Diff
For EWS (3.94 KB, patch)
2016-11-11 20:32 PST, BJ Burg
no flags Details | Formatted Diff | Diff
For EWS (3.95 KB, patch)
2016-11-12 12:29 PST, BJ Burg
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.