[devtools] Fix crash in LogHandler when multiple sessions are attached
The {OnQuicTransportHandshakeFailed} method uses {DispatchToAgents} to send a console message to attached LogHandlers. There can be potentially multiple LogHandlers, so passing a std::unique_ptr is not possible. The first LogHandler receives a valid std::unique_ptr but subsequent will only receive an empty one, causing a crash later down the line. This CL fixes the crash by passing a raw pointer and cloning the log message before handing ownership over to the protocol. R=sigurds@chromium.org Bug: chromium:1069744, chromium:1084418 Change-Id: I6e1c2481b304481fb2b6c24e905f00562973af7f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2207182 Commit-Queue: Simon Zünd <szuend@chromium.org> Reviewed-by:Sigurd Schneider <sigurds@chromium.org> Reviewed-by:
Yutaka Hirano <yhirano@chromium.org> Cr-Commit-Position: refs/heads/master@{#770054}
Showing
Please register or sign in to comment