Changeset 256430 in webkit


Ignore:
Timestamp:
Feb 12, 2020 5:16:04 AM (4 years ago)
Author:
clopez@igalia.com
Message:

WebDriver: return invalidSessionID exception if the WebProcess doesn't respond (crashes)
https://bugs.webkit.org/show_bug.cgi?id=207565

Reviewed by Adrian Perez de Castro.

Report InvalidSessionID if the session connection its not connected.

  • WebDriverService.cpp:

(WebDriver::WebDriverService::findSessionOrCompleteWithError):

Location:
trunk/Source/WebDriver
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebDriver/ChangeLog

    r255343 r256430  
     12020-02-12  Carlos Alberto Lopez Perez  <clopez@igalia.com>
     2
     3        WebDriver: return invalidSessionID exception if the WebProcess doesn't respond (crashes)
     4        https://bugs.webkit.org/show_bug.cgi?id=207565
     5
     6        Reviewed by Adrian Perez de Castro.
     7
     8        Report InvalidSessionID if the session connection its not connected.
     9
     10        * WebDriverService.cpp:
     11        (WebDriver::WebDriverService::findSessionOrCompleteWithError):
     12
    1132020-01-29  Carlos Garcia Campos  <cgarcia@igalia.com>
    214
  • trunk/Source/WebDriver/WebDriverService.cpp

    r255343 r256430  
    515515    if (!m_session || m_session->id() != sessionID) {
    516516        completionHandler(CommandResult::fail(CommandResult::ErrorCode::InvalidSessionID));
     517        return false;
     518    }
     519
     520    if (!m_session->isConnected()) {
     521        m_session = nullptr;
     522        completionHandler(CommandResult::fail(CommandResult::ErrorCode::InvalidSessionID, String("session deleted because of page crash or hang.")));
    517523        return false;
    518524    }
Note: See TracChangeset for help on using the changeset viewer.