• jhacker@arcanefour.com's avatar
    chrome.serial: [POSIX] Queue *Completed() callback in Cancel*Impl() · eef67e92
    jhacker@arcanefour.com authored
    On Mac, Linux and Chrome OS, when a call is made to SerialIoHandler::CancelRead() or SerialIoHandler::CancelWrite(), no callback to SerialIoHandler:ReadCompleted() or SerialIoHandler::WriteCompleted() is triggered in the underlying implementation, as it is on Windows. This causes the cleanup code in SerialConnection::OnAsync*Complete() to never be executed. To fix the behaviour, call SerialIoHandler::Queue*Completed() directly from SerialIoHandlerPosix::Cancel*Impl().
    
    The only code changes are in serial_io_handler_posix.cc, so there should be no effect on Windows.
    
    BUG=383221
    
    R=rockot@chromium.org
    
    TEST=Toggle chrome.serial.setPaused() true then false; more detail and a link to a test app is provided in crbug.com/383221
    
    Review URL: https://codereview.chromium.org/340713002
    
    git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278130 0039d316-1c4b-4281-b951-d872f2087c98
    eef67e92
AUTHORS 16.4 KB