• Guido Urdaneta's avatar
    Fix possible use-after-move in MediaDevicesManager · e777b139
    Guido Urdaneta authored
    A result was unnecessarily moved and possibly used after move
    in content::MediaDevicesManager::OnDevicesEnumerated.
    
    Existing unit tests cover the affected code path, although it
    does not result in a crash, perhaps because the move is
    unnecessary and might be optimized away.
    
    No crashes have been observed in the wild either, except on
    a clusterfuzz build that performs IPC directly instead of going
    through the getCapabilities() JavaScript API.
    
    Bug: 868241
    Change-Id: I2a3d9704a789c67b9eb763e1257504187201f941
    Reviewed-on: https://chromium-review.googlesource.com/1154911Reviewed-by: default avatarHenrik Boström <hbos@chromium.org>
    Commit-Queue: Guido Urdaneta <guidou@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#579026}
    e777b139
media_devices_manager.cc 36.3 KB