Bug 207565

Summary: WebDriver: return invalidSessionID exception if the WebProcess doesn't respond (crashes)
Product: WebKit Reporter: Carlos Alberto Lopez Perez <clopez>
Component: WebDriverAssignee: Carlos Alberto Lopez Perez <clopez>
Status: RESOLVED FIXED    
Severity: Normal CC: aperez, bburg, bugs-noreply, cgarcia, clopez, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Carlos Alberto Lopez Perez 2020-02-11 11:02:18 PST
One method the WPT runner uses to detect a crash inside the browser its to check if WebDriver continues to respond to a simple property get over the connection like current_window_handle

If an exception its returned then its assumed the browser has crashed and WebDriver its restarted

Currently the WebKitGTK webdriver hangs instead of returning an exception.

The Chrome WebDriver returns an InvalidSessionID message in case of crash with the error code "session deleted because of page crash"

We can do something similar for WebKitGTK WebDriver
Comment 1 Carlos Alberto Lopez Perez 2020-02-11 11:08:47 PST
Created attachment 390394 [details]
Patch
Comment 2 Carlos Alberto Lopez Perez 2020-02-12 05:16:09 PST
Comment on attachment 390394 [details]
Patch

Clearing flags on attachment: 390394

Committed r256430: <https://trac.webkit.org/changeset/256430>
Comment 3 Carlos Alberto Lopez Perez 2020-02-12 05:16:13 PST
All reviewed patches have been landed.  Closing bug.
Comment 4 Radar WebKit Bug Importer 2020-02-12 05:17:14 PST
<rdar://problem/59383477>